What is OKLCH? The perceptually uniform color space for modern CSS

By TechCompare · Updated · How we check

Use oklch() in new projects. It's supported in all major browsers, more perceptually uniform than HSL, and a good base for programmatic color systems. The learning curve is small if you already understand HSL.

OKLCH (Lightness, Chroma, Hue) is a modern color space designed to be perceptually uniform, meaning that the same numerical change in a value produces roughly the same perceived change in color, regardless of the hue. This addresses HSL's biggest flaw: in HSL, a lightness value of 50% looks very different for yellow (bright) vs blue (dark).

Format
HSL
Example: #B736CB
Category
Modern Formats
Color knowledge base

How this is calculated

OKLCH has been supported in all major browsers since 2023, so it's safe for production use in 2026.

L (lightness) ranges from 0 to 1 (or 0% to 100%). C (chroma) is the color intensity, typically 0 to 0.4 for screen colors. H (hue) is 0-360 degrees like HSL.

The perceptual uniformity means you can generate entire color palettes mathematically: pick a hue, vary lightness and chroma, and every step looks evenly spaced. This helps with design system token generation.

Verdict

Start new color work in oklch(). The syntax oklch(L C H) uses the same hue angle as HSL, so the mental model transfers from HSL quickly.

The structural upgrade is that the same numeric step produces roughly the same perceived change across hues, so an OKLCH palette generated by varying L and C at a fixed H looks evenly spaced where HSL's 50% lightness reads bright at yellow and dark at blue. OKLCH can also express colors beyond sRGB, such as those in Display P3 and Rec. 2020, and the browser clips or maps any color the display can't show.

More Color scenarios

Hex to RGB
A hex color code is three RGB numbers written in base 16.
View details
RGB vs CMYK
Screens add light and print adds ink. See one color in both, and why a plain CMYK formula can't promise a print match.
View details
HSL color model
Hue, saturation and lightness, with three live sliders and a table of common colors in hex, RGB and HSL.
View details

Frequently asked questions

Should I replace all my hex colors with OKLCH?
No, not retroactively. Use OKLCH for new color work, especially for generating color scales, dark mode variants, and accessible color palettes programmatically.
What's the syntax of oklch() in CSS?
oklch(L C H) or oklch(L C H / alpha). L is lightness from 0 to 1 (or 0% to 100%), C is chroma typically 0 to 0.4 for screen colors, and H is the hue angle 0-360 degrees. The alpha value is optional and ranges 0-1. All modern browsers support this syntax as of 2026.
Does OKLCH support wide-gamut colors like Display P3 and Rec. 2020?
Yes. OKLCH is the cylindrical form of Oklab, which isn't tied to any display gamut, so it can describe colors in sRGB, Display P3, and Rec. 2020 and colors beyond them. That means oklch() can describe colors your display can't show, and the browser will clip or map them. This is one reason OKLCH works well for wide-gamut CSS.