What is OKLCH in CSS?
OKLCH is a CSS colour format written oklch(L C H). L is perceived lightness from 0 to 100%, C is chroma (colourfulness), and H is hue in degrees. Because lightness is perceptual, two colors with the same L look equally bright.
OKLCH is a CSS colour format, oklch(L C H), that describes a colour by perceived lightness, chroma (colourfulness) and hue, so equal lightness values look equally bright. Paste a HEX code below to get its OKLCH value, or move the sliders to pick a colour in OKLCH.
oklch(54.6% 0.215 262.9)#2563ebrgb(37, 99, 235)hsl(221, 83%, 53%)| Colour | HEX | OKLCH |
|---|---|---|
| White | #ffffff | oklch(100% 0 0) |
| Black | #000000 | oklch(0% 0 0) |
| Red | #ef4444 | oklch(63.7% 0.208 25.3) |
| Orange | #f97316 | oklch(70.5% 0.187 47.6) |
| Yellow | #eab308 | oklch(79.5% 0.162 86) |
| Green | #22c55e | oklch(72.3% 0.192 149.6) |
| Blue | #2563eb | oklch(54.6% 0.215 262.9) |
| Purple | #a855f7 | oklch(62.7% 0.233 303.9) |
| Feature | OKLCH | HSL |
|---|---|---|
| Lightness | Perceptual: equal L values look equally bright. | Mathematical: equal L values can look very different. |
| Wide-gamut P3 support | Yes, oklch() can describe Display P3 colors. | No, hsl() is limited to sRGB. |
| Browser support | All current browsers since 2023. | All browsers, for many years. |
OKLCH is a CSS colour format written oklch(L C H). L is perceived lightness from 0 to 100%, C is chroma (colourfulness), and H is hue in degrees. Because lightness is perceptual, two colors with the same L look equally bright.
Paste the HEX code into the converter above. It turns the sRGB channels into OKLab, then reads them as lightness, chroma and hue, and shows the matching oklch() value ready to copy into your CSS.
OKLCH can describe colors wider than a normal sRGB screen can show. When the chroma is too high for the lightness and hue, the color falls outside sRGB, and this converter lowers the chroma until it fits while keeping the lightness and hue.
Yes. Tailwind CSS v4 writes its default palette in oklch(), which gives a more even lightness scale than the old hex values. You can build your own scale in the Tailwind color generator.