- What each format is good for
- Hex is the most portable and the shortest to type. RGB is what the display actually does, making it right for programmatic blending. HSL makes "same colour, lighter" a single-number change, which is why theme systems use it. OKLCH does what HSL only appears to do: because it is perceptually uniform, lightening two different hues by the same amount produces an equal perceived change, whereas in HSL yellow at 50% lightness looks far brighter than blue at 50%.
- Modern and legacy CSS syntax
- Both space-separated modern syntax, rgb(255 0 0), and comma-separated legacy syntax, rgb(255, 0, 0), are shown. They are equivalent in current browsers; the legacy form is there for older targets and for tools that have not caught up.
- Alpha and 8-digit hex
- Transparency is preserved across formats. In hex it becomes an 8-digit value such as #ff000080, where the final pair is the alpha byte, well supported now, but not in very old browsers, where rgba() is the safer choice.
- OKLCH can describe colours your screen cannot show
- The OKLCH space is larger than sRGB, so a high-chroma value may have no sRGB equivalent. Converting such a colour to hex clips it to the nearest displayable one, which looks less saturated, and the tool warns when that happens. This is not a bug. It is why OKLCH matters for wide-gamut displays.
- Contrast ratios and WCAG thresholds
- Contrast against white and black is computed from WCAG relative luminance. WCAG AA requires 4.5:1 for body text and 3:1 for large text; AAA requires 7:1. The maximum possible ratio is 21:1, black on white. Checking this while picking a colour is far easier than retrofitting accessibility later.