Convert a colour between every common format — including OKLCH — with WCAG contrast ratios included.
Ctrl + Enter to run
Converts between HEX, RGB, HSL, CMYK and OKLCH, and shows the contrast of the result against black and white. Most day-to-day need is mundane — a designer supplies HEX, a chart library wants RGB, a stylesheet is written in HSL.
OKLCH is the one worth learning. HSL lightness does not track perceived brightness, so yellow and blue at the same lightness value look nothing alike and a palette built by rotating hue comes out uneven. OKLCH is built on a perceptual model, which makes a consistent palette arithmetic rather than trial and error.