Color Converter
color → colorConvert HEX, RGB, HSL and OKLCH, and check contrast against WCAG.
contrast
Body text at this contrast
About Color Converter
Enter a colour in any notation — a hex value, rgb(), hsl(), or oklch() — and get all four back, with a swatch so you can see what you actually typed. Percentage and 0-255 channel syntax are both understood, as are three-, four-, six- and eight-digit hex.
OKLCH is included because it is what modern CSS reaches for, and because it behaves differently from HSL in a way that matters. In HSL, two colours with the same lightness value can look nothing alike in brightness — yellow at 50% looks far lighter than blue at 50%. OKLCH is built on a perceptual model, so equal lightness numbers look equally light, which is what makes a generated palette come out even instead of lumpy.
Below the conversions is a WCAG contrast checker. Enter a second colour and it grades the pair against the AA and AAA thresholds for both body and large text, and previews real text at that contrast — because a ratio alone does not tell you whether the result is comfortable to read.
Common questions
This page does the work itself, in this tab. Nothing you paste is sent to a server. Close the tab and no copy remains.