Blog · Color Science

CIELAB Explained

Complete guide to CIELAB — the perceptually uniform color space that underpins Delta E and modern color difference measurement.

Published November 15, 2026 · 8 min read

What Is CIELAB?

CIELAB (also written CIE L*a*b* or simply Lab) is a color space developed by the International Commission on Illumination (CIE) in 1976. It was designed to be perceptually uniform — meaning equal numerical changes correspond to equal perceived color differences.

CIELAB remains the industry standard for color difference measurement (Delta E) and is used in manufacturing, printing, paint matching, textile production and digital color management. Every color difference algorithm that matters is built on CIELAB or a refinement of it.

The Three Axes of CIELAB

L* — Lightness

L* ranges from 0 (black) to 100 (white). It is a perceptual lightness scale designed to match how the eye responds to luminance.

a* — Green-Red Axis

a* represents the green-red balance. Negative values are green, positive values are red, and a* = 0 is neutral (neither green nor red).

b* — Blue-Yellow Axis

b* represents the blue-yellow balance. Negative values are blue, positive values are yellow, and b* = 0 is neutral.

Unlike RGB or HSL, the three axes of CIELAB are approximately orthogonal in perceptual space — you can adjust one without affecting the others as much as RGB axes do.

Why CIELAB Exists

Before CIELAB, color measurement was based on the CIE 1931 XYZ color space, which is physically accurate but not perceptually uniform. The XYZ space uses the response of the three cone cell types in the human eye, but equal distances in XYZ do not correspond to equal perceived differences.

CIELAB was a deliberate attempt to correct this. The transformation from XYZ to Lab involves non-linear adjustments that make the resulting space more perceptual — for example, a Delta E of 5 in the red region should look similarly different from a Delta E of 5 in the green region.

The sRGB to CIELAB Pipeline

Converting from a standard web color (sRGB) to CIELAB is a two-step process.

Step 1: sRGB to XYZ

First, apply gamma decoding to convert sRGB values (which are gamma-encoded) to linear RGB:

function gammaDecode(c) {
  c /= 255;
  return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
}

Then apply the sRGB → XYZ matrix (with D65 reference white):

X = r * 0.4124 + g * 0.3576 + b * 0.1805;
Y = r * 0.2126 + g * 0.7152 + b * 0.0722;
Z = r * 0.0193 + g * 0.1192 + b * 0.9505;

Multiply by 100 to get the standard XYZ scale (0-100).

Step 2: XYZ to CIELAB

CIELAB uses the reference white of the illuminant (D65 for standard web colors):

const Xn = 95.047, Yn = 100.000, Zn = 108.883;

function f(t) {
  return t > 0.008856 ? Math.cbrt(t) : (7.787 * t) + 16 / 116;
}

const fx = f(X / Xn);
const fy = f(Y / Yn);
const fz = f(Z / Zn);

const L = 116 * fy - 16;
const a = 500 * (fx - fy);
const b = 200 * (fy - fz);

CIELAB to sRGB

The reverse pipeline reverses each step:

const fy = (L + 16) / 116;
const fx = a / 500 + fy;
const fz = fy - b / 200;

function fInv(t) {
  return t * t * t > 0.008856 ? t * t * t : (t - 16 / 116) / 7.787;
}

const X = fInv(fx) * Xn;
const Y = fInv(fy) * Yn;
const Z = fInv(fz) * Zn;

// XYZ to linear RGB
const r = X * 3.2406 + Y * -1.5372 + Z * -0.4986;
const g = X * -0.9689 + Y * 1.8758 + Z * 0.0415;
const b2 = X * 0.0557 + Y * -0.2040 + Z * 1.0570;

// Gamma encode
function gammaEncode(c) {
  return c <= 0.0031308 ? 12.92 * c : 1.055 * Math.pow(c, 1/2.4) - 0.055;
}

const R = Math.round(gammaEncode(r) * 255);
const G = Math.round(gammaEncode(g) * 255);
const B = Math.round(gammaEncode(b2) * 255);

Delta E: Measuring Color Difference

Delta E (ΔE) is the perceptual difference between two colors. Multiple Delta E formulas exist, each building on CIELAB:

Delta E 1976 (CIE76)

The original formula — simple Euclidean distance in Lab space:

ΔE = sqrt((L1 - L2)² + (a1 - a2)² + (b1 - b2)²)

Simple but tends to overestimate differences in saturated colors.

Delta E 1994 (CIE94)

Adds weighting functions to compensate for non-uniformity in the saturated region. Used mainly in textile and paint industries.

Delta E 2000 (CIEDE2000)

The current industry standard. Adds more sophisticated weighting, corrections for the blue-purple region, and rotation terms for hue. Most color management tools use CIEDE2000 for accurate matching.

Interpreting Delta E Values

Delta E Interpretation
< 1.0Imperceptible to the human eye
1.0 - 2.0Only noticeable side-by-side
2.0 - 10Perceptible at a glance
10 - 20Clearly different
20 - 50Substantially different
> 50Very different colors

Applications of CIELAB

  • Brand color matching: verifying that a printed material matches the digital brand color (Delta E below 2 is often the target)
  • Quality control: ensuring paint batches, textile dye lots or plastic parts match the reference
  • Gradient interpolation: interpolating in Lab produces more perceptually even transitions than RGB
  • Image comparison: detecting subtle differences between before/after images
  • Color science: any research requiring perceptual measurement

Limitations of CIELAB

  • Blue-purple problem: CIELAB does not perfectly represent the perceptual spacing of blue and purple hues
  • Illuminant dependency: results vary with the reference white (D50 for print, D65 for screen, A for incandescent)
  • Not perfectly uniform: despite the design goal, real-world tests show uneven perceptual steps in some regions
  • Complexity: the XYZ intermediate step makes the math heavier than RGB or HSL

OKLab (2020) was designed to fix the blue-purple problem while simplifying the math. For modern design work, OKLab is often preferred; for legacy compatibility and Delta E calculations, CIELAB remains essential.

Frequently Asked Questions

Related Resources