Last updated 28 August 2026
Why so many notations exist
HEX and RGB describe the same thing in different bases — three channels of light, nothing more. HSL and HSV rearrange those channels into hue, saturation and lightness, which is far easier to reason about when you want a colour that is the same but darker, or the same but less intense. CMYK belongs to a different world entirely: it describes ink on paper, where colours subtract light rather than add it, which is why a vivid screen colour often cannot be printed and the CMYK figure here should be treated as an approximation rather than a promise. The luminance value shown is the one contrast ratios are built from, and it is what decides whether black or white text sits more readably on top.
Common questions
Which format should I use in CSS?
Any of them work. HEX is the most common and the most compact, but HSL is often easier to work with by hand because adjusting lightness or saturation is a single number change rather than recalculating three.
Why is the CMYK value approximate?
CMYK describes ink, and the conversion depends on the paper, the press and the colour profile in use. The figure here is a straightforward mathematical conversion, which is close enough for a rough idea but not for print production.
What is relative luminance?
A weighted measure of how bright a colour appears, with green counting for more than red and red for more than blue, because human eyes are more sensitive to green. It is the basis of every WCAG contrast calculation.
Can I paste a colour in any format?
Yes. HEX with or without the hash, three or six digits, rgb() and hsl() are all recognised and converted the moment they parse.