Color Converter
Color Converter
Convert colors between HEX, RGB, and HSL formats. Pick a color or type in any format.
#58a6ff
#58a6ffff
rgb(88, 166, 255)
0.35, 0.65, 1.00
hsl(210, 100%, 67%)
--color-name: #58a6ff;
About the Color Converter
Designers hand over colours as HEX codes, CSS frameworks use RGB or HSL, design tokens may need an alpha channel, and graphics APIs often want channel values between 0 and 1. They all describe the same colour in different ways, and converting between them by hand is tedious.
This color converter accepts any common format — #58a6ff, rgb(88, 166, 255), hsl(210, 100%, 67%) — or a pick from the colour picker, and instantly shows the equivalent HEX, 8-digit HEX with alpha, RGB, normalised RGB (0–1), HSL and a CSS custom property declaration, each ready to copy.
Common uses
- Converting a brand colour from a style guide into the format your CSS uses.
- Creating lighter and darker variants by adjusting the lightness in HSL.
- Getting 0–1 channel values for Unity, SwiftUI, OpenGL or shader code.
- Writing CSS variables for a design system or theme.
How to use it
- Pick a colour with the Color Picker, or type a value in any supported format.
- Every other representation updates immediately.
- Click Copy next to the format you need.
Example
One colour in every format:
#58a6ff
HEX8: #58a6ffff
RGB: rgb(88, 166, 255)
RGB 0–1: 0.35, 0.65, 1.00
HSL: hsl(210, 100%, 67%)
CSS: --color-name: #58a6ff;
Tips and common pitfalls
- HSL is the easiest model for building palettes: keep hue and saturation and change only lightness for hover, active and disabled states.
- Check text contrast. WCAG requires a ratio of at least 4.5:1 for normal body text against its background.
- In 8-digit HEX the last two digits are alpha:
ffis opaque,80is about 50% transparent and00is fully transparent. - Three-digit shorthand such as
#fa0expands to#ffaa00by doubling each digit.
Frequently asked questions
What is the difference between RGB and HSL?
RGB mixes red, green and blue light. HSL describes the same colours by hue (angle on the colour wheel), saturation (intensity) and lightness, which is closer to how people think about colour.
Why does my colour look different on another screen?
Displays differ in colour gamut and calibration, and some images carry colour profiles. CSS colours are interpreted in the sRGB colour space by default.
Does it support CMYK?
No. CMYK is a print colour model whose conversion depends on paper and ink profiles. For screen work, HEX, RGB and HSL cover every CSS use case.
Is anything sent to a server?
No. Conversions run in your browser.