From R(λ) to XYZ to L*a*b*

The CIE pipeline as the tool implements it: CMFs, illuminant SPD, 5-nm integration.

Lesson 1 of 5 · ~9 min read

An anti-reflection coating never reflects perfectly zero across the whole visible band. Whatever residual reflection remains has a shape — a spectrum R(λ) — and a human eye sees that spectrum as a colour. The job of this lesson is to turn R(λ) into three numbers (L*, a*, b*) that match how a person would describe it.

The CIE pipeline, in order

The Colour-Shift calculator reads the reflectance from the transfer-matrix kernel at every 5 nm from 380 to 780 nm, then runs the standard CIE colorimetry chain. Three ingredients enter: the reflectance R(λ), the illuminant power spectrum S(λ), and the three CIE 1931 2° observer colour-matching functions x̄, ȳ, z̄.

X = ∫ R(λ) S(λ) x̄(λ) dλ, Y = ∫ R(λ) S(λ) ȳ(λ) dλ, Z = ∫ R(λ) S(λ) z̄(λ) dλ

The tool uses CIE Standard Illuminant D65 as S(λ) — the display and daylight default from CIE 15:2018. Every integral is a plain Riemann sum over 81 points at 5 nm spacing; no interpolation, no smoothing. Normalisation divides by ∫ S(λ) ȳ(λ) dλ so that a perfect reflector (R ≡ 1) under D65 returns the D65 white point (Y = 1).

XYZ to L*a*b*

CIELAB is a perceptually uniform recoding of XYZ around a white point. The tool uses the D65 white point with Xn = 0.95047, Yn = 1, Zn = 1.08883:

L* = 116 f(Y/Yn) − 16, a* = 500 [f(X/Xn) − f(Y/Yn)], b* = 200 [f(Y/Yn) − f(Z/Zn)]

with f(t) = t1/3 for t > 0.008856 and the linearised branch f(t) = 7.787 t + 16/116 elsewhere. L* runs 0–100 (dark to light). a* and b* are red–green and yellow–blue: positive a* is red, positive b* is yellow.