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).
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
Related guides
Frequently asked questions
Should I replace all my hex colors with OKLCH?
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?
Related tools
Contrast Checker
Check color contrast ratios for WCAG AA/AAA accessibility compliance.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolAspect Ratio Visualizer
Visually compare width differences between 16:9, 21:9, and 32:9 monitors.
Use tool