CIE Lab
The classical perceptually uniform color space. Defined in 1976 and still the reference for color science, print and display production.
lab(45% 42 -78).The three axes
L* — Lightness
Ranges from 0 (black) to 100 (white). Because Lab is perceptually uniform, equal steps in L* produce roughly equal perceived changes in lightness, regardless of hue.
a* — Green–red axis
Negative values lean green, positive values lean red. Typical sRGB range is roughly −86 to +98.
b* — Blue–yellow axis
Negative values lean blue, positive values lean yellow. Typical sRGB range is roughly −108 to +94.
Why Lab was created
Before Lab, color scientists had the CIE XYZ space — accurate but not perceptually uniform. Two colors that look equally different to the eye could have wildly different numeric distances in XYZ. Lab was designed to fix this by transforming XYZ into a space where numeric distance correlates with perceived difference.
The result is a color space where:
- Equal numeric differences look like equal visual differences.
- Lightness can be adjusted independently of hue.
- Color differences can be quantified objectively (Delta E).
- Colors can be compared across devices, media and gamuts.
Delta E — measuring color difference
Delta E (ΔE) is the Euclidean distance between two colors in Lab. It quantifies how different two colors look to the human eye, on a scale where lower is closer:
| ΔE | Perceived difference |
|---|---|
| 0–1 | Not visible to the human eye |
| 1–2 | Perceptible only to a trained observer |
| 2–3.5 | Noticeable at a glance |
| 3.5–5 | Clearly noticeable |
| 5+ | Two different colors |
Delta E is the standard metric for print production, display calibration and color accuracy verification. It is also used to select the closest color from a palette.
How Lab relates to XYZ and RGB
The conversion path is:
sRGB → linear RGB → XYZ (D65) → Lab
Each step is a defined mathematical transformation:
1. Apply sRGB gamma decoding to get linear light values
2. Multiply by the RGB-to-XYZ matrix
3. Normalize by the D65 white point
4. Apply the Lab nonlinearity (cube root for mid-values)
CIE Lab vs OKLab
| Aspect | CIE Lab (1976) | OKLab (2020) |
|---|---|---|
| Origin | International Commission on Illumination | Björn Ottosson |
| Formula complexity | Complex (piecewise, cube root) | Simple (two matrices, cube root) |
| Blue-region accuracy | Distorted in deep blues | Uniform across all hues |
| Standard for | Print, color science, industry | Design systems, CSS, modern UI |
| Range (sRGB) | L 0–100, a −86 to 98, b −108 to 94 | L 0–1, a −0.4 to 0.4, b −0.4 to 0.4 |
Practical syntax in CSS
/* Lab syntax */
color: lab(45% 42 -78);
/* With alpha */
color: lab(45% 42 -78 / 0.5);
/* Adjusting lightness without changing hue */
color: lab(20% 42 -78);
color: lab(80% 42 -78);
When to use Lab
- Color matching — comparing across devices, papers or screens.
- Print production — Delta E is the industry standard for color accuracy.
- Nearest-color search — finding the closest palette entry to a target color.
- Color science research — the canonical reference space for CIE-based work.
Continue reading
Frequently asked questions
What is CIE Lab?
CIE Lab (also written CIELAB or L*a*b*) is a perceptually uniform color space defined by the International Commission on Illumination in 1976. It describes a color with three values: L* for perceptual lightness, a* for the green–red axis, and b* for the blue–yellow axis.
Why is Lab important?
Lab was designed so that equal numeric differences correspond to roughly equal perceived differences. This makes it useful for color matching, quality control in printing, calculating color differences (Delta E), and any application where perceived color accuracy matters more than device-specific values.
What is Delta E?
Delta E (ΔE) is the Euclidean distance between two colors in Lab. It quantifies perceptual difference: ΔE of about 1 is barely noticeable, 2–3 is noticeable to a trained eye, 5+ is obviously different. Delta E is the standard metric for color accuracy in print and display production.
What is the difference between CIE Lab and OKLab?
Both are perceptually uniform color spaces. CIE Lab (1976) is the classical standard, widely used in color science and print. OKLab (2020) is a modern alternative that is simpler to compute and handles the blue region more evenly. OKLab is better for design systems; Lab remains the reference for scientific and print work.