Skip to main content
BVDART Logo

Perceptual uniformity in color spaces

A perceptually uniform color space aims to make similar coordinate distances correspond to similar perceived color differences.

Compare hue sweeps with their measured lightness traces.

HSL · S 80%
0°30°60°90°120°150°180°210°240°270°300°330°
OKLCH
0°30°60°90°120°150°180°210°240°270°300°330°
Measured Lab lightness across hue: HSL and OKLCH0255075100L* · D65- - HSL━━ OKLCH
HSL · displayed L* range 47.6–91.4OKLCH · displayed L* range 57.7–61.1

Equal HSL lightness allows a large brightness swing around the wheel. OKLCH aims for steadier apparent lightness; these two L coordinates have different definitions. Out-of-gamut OKLCH samples reduce chroma at fixed L and hue. The plot measures the resulting displayed Lab L*, a third lightness definition.

Lightness moves first, then OKLCH chroma. Watch how the two hue strips and measured lightness ranges respond. Use any control to take over.

What to try
  1. Follow the HSL and OKLCH strips across hue and compare the plotted Lab L* values.
  2. Change Nominal lightness and OKLCH chroma, then read the displayed L* ranges.
Open in the Lab ↗

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