Color Converter: HEX, RGB, HSL, HSV and CMYK
Convert any colour between HEX, RGB, HSL, HSV, CMYK, LAB and OKLCH, with alpha, names and a contrast check.
Loading tool…
How to use the Color Converter
- Pick a colour with the picker, or type a value into HEX, RGB, HSL, HSV, CMYK or a CSS colour name.
- Watch the other formats, including LAB and OKLCH, update as you type, and slide Alpha for transparency.
- Check the contrast against white and black, and click a related colour to jump to it.
- Click Copy next to the format you need, for example the HEX code or rgba() for CSS.
About this tool
A colour on screen is stored as red, green and blue values from 0 to 255. HEX is simply those three numbers written in base 16, so rgb(124, 58, 237) becomes #7C3AED. HSL and HSV describe the same colour as a hue angle from 0 to 360 degrees plus saturation and lightness (or value), which is closer to how people think about colour and easier to tweak by hand.
CMYK describes ink: cyan, magenta, yellow and black percentages used in print. The conversion here is the standard mathematical one used on screens. Real printers use ICC colour profiles, so a printed result can look duller than the screen, especially for bright violets and greens. Treat the CMYK numbers as a starting point and check with your printer. Alpha adds transparency: 0 is fully clear and 1 is solid, written as an 8-digit HEX or rgba(). LAB (D65) and OKLCH describe colour by perceived lightness, which makes them handy for even-looking palettes and CSS colour functions. The name field accepts a common subset of the 148 CSS colour names and shows the nearest name otherwise.
Rounding means a round trip can shift a value by one step in rare cases, for instance HSL to RGB and back. The HEX and RGB fields are exact.
Frequently asked questions
How do I convert HEX to RGB?
Split the HEX code into three pairs and convert each from base 16 to decimal. #7C3AED gives 7C = 124, 3A = 58 and ED = 237, so rgb(124, 58, 237). The tool does this as you type.
What is the difference between HSL and HSV?
Both use hue and saturation. HSL uses lightness, where 50% is the pure colour and 100% is white. HSV uses value, where 100% is the brightest version of the colour.
Is the CMYK value print accurate?
No. It is a mathematical conversion. Print results depend on the paper, ink and colour profile, so ask your printer for proofs on brand colours.
Can I paste a 3-digit HEX code?
Yes. #F80 is expanded to #FF8800. Eight-digit HEX with alpha is accepted too, but the alpha part is ignored.
Does it show colour contrast?
Yes. A small panel shows the WCAG contrast ratio of your colour as text on white and on black, with AA or AAA ratings. Use the contrast checker for custom pairs.
Need a custom tool or website?
IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.









