Enter a colour in any format to convert between HEX, RGB and HSL — conversions run locally in your browser, with nothing uploaded.
How it works
- All formats represent the same color — editing any field recalculates the others.
- HSL is often more intuitive for design work: hue is the color itself, saturation is intensity, lightness is how close to black or white.
- CMYK (cyan/magenta/yellow/key) is the print industry's standard model — useful when preparing color specs for printed materials, though actual print output varies by printer and paper.
- "Nearest named color" finds the closest match among the 140 standard CSS color names, by Euclidean distance in RGB space — click it to copy the name.
Convert colours between HEX, RGB, HSL, LAB and OKLCH, preview them, and check WCAG contrast for accessible text. Everything updates live in your browser.
Frequently asked questions
Which colour formats are supported?
HEX, RGB, HSL, LAB and OKLCH, all kept in sync — change one and the rest update instantly, so you can work in whichever space you prefer.
What is OKLCH and why use it?
OKLCH is a modern, perceptually-uniform colour space, meaning equal numeric steps look like equal visual steps. It's excellent for building consistent, accessible colour scales.
How does the contrast checker help?
It calculates the WCAG contrast ratio between two colours and tells you whether it passes AA and AAA, so your text stays readable for everyone.
Is LAB useful for design?
LAB is device-independent and perceptually oriented, which makes it handy for judging whether two colours are genuinely close in appearance rather than just numerically.
Why digital RGB often runs from 0 to 255
Eight bits provide 256 possible values. Giving red, green and blue one 8-bit channel each produces 256 × 256 × 256 = 16,777,216 possible RGB combinations before considering transparency.
Why hexadecimal fits RGB so neatly
Two hexadecimal digits represent values from 00 to FF, which is 0 to 255 in decimal. A six-digit color such as #FF0000 is therefore three byte-sized values: red FF, green 00 and blue 00.