What to try
- Follow the HSL and OKLCH strips across hue and compare the plotted Lab L* values.
- Change Nominal lightness and OKLCH chroma, then read the displayed L* ranges.
What to look for: Equal HSL lightness permits a large variation across hues. The two spaces define lightness differently; the plot measures a third definition, Lab L*, after sRGB conversion.
How it works
HSL is convenient for selecting a hue, but equal HSL lightness does not make different hues look equally light. Yellow and blue can be very different in perceived brightness while sharing the same nominal HSL saturation and lightness.
Oklab was designed to improve perceptual behavior for image operations. Its polar form, OKLCH, separates lightness, chroma and hue. It remains a model, and conversion to the display gamut can alter requested coordinates.
Use it in the Lab
Use OKLCH in the Lab’s harmony and gradient generators when lightness consistency matters. Compare the result at the actual output size rather than assuming equal coordinates guarantee equal visual weight.
Limits & distinctions
Perceptual uniformity is approximate. This study reduces chroma at fixed OKLCH lightness and hue to fit sRGB. That mapping and eight-bit rounding can change the requested coordinates.
Further reading
Perceptual uniformity is the holy grail for color comparisons. A color space is perceptually uniform when a given numerical distance between two colors always corresponds to the same perceived visual difference — regardless of where in the space those colors sit.
The Problem with RGB
In RGB space, a Euclidean distance of 10 units between two dark blues looks like barely any change, while the same distance of 10 units between two yellows can appear dramatically different. This non-uniformity means that simple distance calculations in RGB are unreliable for human-perceived similarity.
CIELAB: The First Attempt
The CIE 1976 L*a*b* color space (CIELAB) was specifically designed to be perceptually uniform. It uses three axes: L* for lightness, a* for green–red, and b* for blue–yellow. While a significant improvement over RGB, CIELAB still has known non-uniformities, particularly in the blue region, which led to increasingly complex Delta E formulas (CIE76, CIE94, CIEDE2000) to compensate.
OKLAB: The Modern Solution
OKLAB, designed by Björn Ottosson in 2020, achieves better perceptual uniformity than CIELAB with a simpler mathematical model. Its cylindrical form, OKLCH (Lightness, Chroma, Hue), has been adopted by CSS Color Level 4, making it the de facto standard for perceptually uniform color manipulation on the web.
Key Takeaway
If you need to compare, sort, or interpolate colors in a way that matches human perception, always convert from RGB to a perceptually uniform space like OKLAB or CIELAB first. Simple Euclidean distance in RGB is fast but perceptually incorrect.
Why It Matters for Generative Art
In palette generation and color harmony, perceptual uniformity determines whether a gradient looks smooth or has banding, whether complementary colors feel equally vibrant, and whether a quantized palette faithfully represents the original image. Our Lab tools use OKLCH for gradient interpolation precisely because of this property.
Related Lab categories
Sources & references
Guide updated
