Color converter
Convert a colour between HEX, RGB, HSL, HSV and CMYK.
Every format at once
Type a colour in any common notation — #22d3ee, rgb(34, 211, 238), hsl(187, 85%, 53%), or a CSS colour name — and get all the others back, along with a swatch and the relative luminance.
Which format to use, and when
HEX is the design-tool default and the most portable. RGB is the same information written differently, and useful when a value is calculated rather than typed. HSL is the one worth learning: hue, saturation and lightness are how people actually think about colour, so building a palette by holding the hue and varying the lightness gives coherent results in a way that nudging hex digits never does.
HSV appears in colour pickers. CMYK belongs to print.
CMYK is an approximation, and here is why
Screens emit light and add colours together; ink absorbs light and subtracts. There is no exact mapping between them, and any conversion without a colour profile and a target press is an estimate. The figures here use the standard naive formula — fine for a rough idea, not for anything going to a printer, where the printer's own profile is what matters.
Anyone who has seen a vivid screen blue arrive as a flat navy on paper has met this problem. It is not a conversion error; it is that the ink cannot make that colour.
Relative luminance
The last figure is what accessibility contrast calculations are built on. If you are checking whether text will be readable, the contrast checker does the comparison directly.
Nothing is uploaded
Conversion runs in your browser as you type.
Common questions
Which format should I use?
HEX for portability, HSL for building palettes — varying lightness at a fixed hue gives coherent results.
Why is CMYK approximate?
Screens add light, ink subtracts it. Without a colour profile and a target press, any conversion is an estimate.
Does it accept colour names?
Yes, any CSS named colour, along with hex, rgb and hsl notation.
What is relative luminance for?
It is the basis of accessibility contrast ratios. The contrast checker uses it directly.
Does it handle transparency?
Yes — 8-digit hex and rgba both work, and the alpha is preserved in the output.