D = 1 is complete adaptation. CIECAM02 computes it from the surround and the adapting luminance; here it is yours to set, and every figure says which value it used. The time course that gets you there is in Dynamics.
Load a photograph, or generate the sample sweep, and this view fills with the original, the adapted result, the per-pixel adaptation state and the two spectra — all computed on this device.
The sample is a synthetic HSL sweep — a test target, not a photograph, and labelled as one wherever a figure comes from it.
M, diag(d), the full product and all eight transforms compared are in Matrix — one copy, so the two cannot drift.
Compares all 8 CAT methods on a standardised test colour set at the current adaptation state A(t), reporting mean/median/min/max ΔE₀₀ and matrix diagnostics.
Paste HEX values (one per line, max 50) to compute adapted colours, ΔE₀₀, and L*C*h° at the current adaptation state.
CIE 160:2004 — A Review of Chromatic Adaptation Transforms
CIE Technical Report 160:2004 is a review of chromatic adaptation transforms, not a specification and not a recommendation. It sets out the general von Kries diagonal-adaptation framework X’ = M⁻¹ · diag(d) · M · X, where M projects tristimulus values into a cone-response-like space, and surveys the transforms in use against the published corresponding-colour data sets (Luo & Rhodes, Breneman, Kuo & Luo).
Bradford is the transform such surveys compare against, which is why the Matrix view reports every other transform as a difference from it. This tool does not hold the corresponding-colour sets — they are marked absent in Data — so nothing here ranks one transform above another for accuracy. What it can show is what each one does to your image.
CIE 159:2004 — CIECAM02
CIE 159:2004 defines the CIECAM02 colour appearance model which embeds the CAT02 chromatic adaptation transform. CAT02 uses a modified von Kries framework with a specific 3×3 cone-response matrix designed to improve upon Hunt–Pointer–Estévez. The adaptation degree D (0–1) controls partial adaptation, with D = 1 for full adaptation and D computed from luminance and surround for typical viewing conditions.
CIECAM02 superseded CIECAM97s but has known instabilities in the blue region for high-chroma stimuli, leading to CAT16 in the successor CAM16 model.
CAM16 / CAT16 — Li, Li, Wang, Xu, Luo et al. (2017)
CAM16 is the successor to CIECAM02, introduced by Li et al. (2017) in Color Research & Application. It replaces CAT02 with CAT16, a revised 3×3 matrix that eliminates the numerical instabilities observed in CIECAM02 for high-chroma blue stimuli.
CAT16 retains the von Kries diagonal framework but uses an improved cone-response matrix optimised against modern corresponding-colour data sets. It is the recommended CAT for new implementations.
ICC.1:2022 — ICC Profile Specification
The International Color Consortium profile format specification (ICC.1:2022-05) mandates
D50 as the profile connection space (PCS) illuminant. All chromatic adaptation for
ICC workflows must convert to/from D50 using the Bradford transform (recommended)
or a method specified in the profile's chad tag.
Version 5 profiles support parametric PCS and may encode adaptation matrices explicitly, but Bradford remains the de facto standard for v2/v4 interoperability.
Fairchild & Reniff (1995) — Time Course of Chromatic Adaptation
Fairchild & Reniff (1995) published seminal psychophysical experiments measuring the time course of chromatic adaptation for asymmetric colour matching. They found that adaptation follows an approximately exponential decay with a time constant τ ≈ 60–100 ms for rapid neural adaptation, plus a slower component τ ≈ 10–20 s for photopigment bleaching recovery.
Their data supports the dual-process model: fast cone gain control (sub-second) and slow pigment regeneration (minutes). This lab's A(t) model captures the fast component; the slow component is beyond typical display durations.
Brainard & Wandell (1992) — Asymmetric Colour Matching
Brainard & Wandell (1992) investigated how observers adapt to changes in illumination using asymmetric colour matching. Their experiments demonstrated that adaptation is approximately (but not perfectly) von Kries-like: gain changes in L, M, S cone channels are largely independent but show some cross-channel interactions.
The degree of adaptation depends on spatial structure — uniform fields produce near-complete adaptation, while complex scenes show incomplete adaptation (D < 1). This motivates the spatial adaptation controls in this lab.
Foster (2011) — Colour Constancy
Foster (2011) provides a comprehensive review of colour constancy — the visual system's ability to perceive stable surface colours under changing illumination. The review covers computational models (von Kries adaptation, Retinex, Bayesian colour constancy), psychophysical data, and neural mechanisms.
Key finding: colour constancy is typically 50–80% for natural scenes (the "degree of constancy" or "Brunswik ratio"), meaning adaptation is incomplete. This justifies the strength parameter A∞ < 1 in this lab's model.
CIE 15:2018 — Colorimetry (4th edition)
CIE 15:2018 is the primary CIE technical report on colorimetry, covering standard illuminants (A, D50, D65, etc.), standard observers (2° 1931, 10° 1964), tristimulus computation, CIELAB, CIELUV, and colour-difference formulae (ΔEab, ΔE94, ΔE00).
All XYZ tristimulus values, illuminant whitepoints, and Lab conversions in this lab follow CIE 15:2018 definitions and normalisations.
Exponential Decay Adaptation Model
A(t) = A0 for t ≤ d
A(t) — adaptation degree at time t (0 = unadapted, 1 = fully adapted)
A0 — initial adaptation state at t = 0
A∞ — asymptotic (final) adaptation degree (strength)
τ — time constant of adaptation (seconds). Smaller τ = faster adaptation
d — onset delay before adaptation begins (seconds)
This models the fast neural gain-control component of chromatic adaptation (Fairchild & Reniff 1995). The exponential form follows from first-order linear system dynamics where the cone response gain adjusts proportionally to the error between current and equilibrium states.
Von Kries Diagonal Adaptation
[Y'] = [Y]
[Z'] [Z]
dc = 1 + D × (Ldst,c / Lsrc,c − 1) c ∈ {L, M, S}
M — 3×3 cone-response matrix (method-dependent: Bradford, CAT02, etc.)
D — degree of adaptation (from the decay model A(t) in this lab)
Lsrc, Ldst — source/destination white-point LMS cone responses
When D = 0, the transform is identity (no adaptation). When D = 1, full adaptation maps the source white to the destination white. Intermediate D values model partial adaptation — the time-varying A(t) drives D continuously from A0 to A∞.
Chromatic Adaptation Matrices (M)
[−0.7502 1.7135 0.0367]
[ 0.0389 −0.0685 1.0296]
[−0.22630 1.16532 0.04570]
[ 0.0 0.0 0.91822]
[−0.7036 1.6975 0.0061]
[ 0.0030 0.0136 0.9834]
[−0.250268 1.204414 0.045854]
[−0.002079 0.048952 0.953127]
[−0.8364 1.8006 0.0357]
[ 0.0297 −0.0315 1.0018]
[−0.5918 1.5512 0.0406]
[ 0.0008 0.0239 0.9753]
[−0.22981 1.18340 0.04641]
[ 0.0 0.0 1.0]
[0 1 0]
[0 0 1]
XYZ ↔ sRGB Conversions
Linear → sRGB: c ≤ 0.0031308 ? 12.92c : 1.055c1/2.4 − 0.055
MsRGB = [0.4124564 0.3575761 0.1804375]
[0.2126729 0.7151522 0.0721750]
[0.0193339 0.1191920 0.9503041]
sRGB is the default colour space for web/display content (IEC 61966-2-1:1999). The gamma function (piecewise linear + power) linearises channel values before XYZ conversion. The 3×3 matrix MsRGB converts linear RGB to CIE XYZ under D65 illumination.
CIELAB (L*a*b*)
a* = 500 [f(X/Xn) − f(Y/Yn)]
b* = 200 [f(Y/Yn) − f(Z/Zn)]
f(t) = t1/3 if t > ε
f(t) = (κt + 16) / 116 otherwise
ε = 216/24389 ≈ 0.008856
κ = 24389/27 ≈ 903.3
ΔE Colour Difference Formulas
ΔE00 (CIEDE2000) — the state-of-the-art colour difference formula, incorporating lightness, chroma, and hue weighting functions plus an interactive term for the blue region. Used in this lab for all quality metrics.
SL, SC, SH are parametric weighting functions. RT is the rotation term compensating for the interaction between chroma and hue differences in the blue region. Full formula per CIE 142:2001.
SPD Generation
Planckian radiator (CCT < 4000 K):
CIE daylight model (CCT ≥ 4000 K):
xD, yD from CCT via CIE daylight locus
M1, M2 from xD, yD
S0, S1, S2 are CIE daylight basis vectors tabulated at 10 nm intervals from 380–780 nm. This lab stores 41-point tables and interpolates for arbitrary CCT values.
Spatial Adaptation Model
The per-pixel adaptation state is modulated by local image luminance:
delaypx = delay × (1 + scaled × (1 − Ypx))
Apx(t) = A∞ + (A0 − A∞) · exp(−(t − delaypx) / τpx)
Afinal(t) = mix × Apx(t) + (1 − mix) × Aglobal(t)
Ypx is the CIE Y (luminance) of the pixel. Dark pixels (low Y) get larger τ and delay, meaning they adapt more slowly — consistent with psychophysical findings that scotopic adaptation is slower than photopic adaptation (Adelson 1982, Hayhoe et al. 1992).
The mix parameter blends per-pixel local state with the uniform global state. At mix = 0, all pixels share the same A(t). At mix = 1, each pixel has its own luminance-dependent adaptation timeline.
Three entries were wrong. The Sharp matrix was credited to a paper about standard RGB colour spaces rather than to Finlayson & Süsstrunk's sharpening paper; the CAM16 title ended “s-CIELAB” instead of “CAM16-UCS”; and CMCCAT2000 was cited to a CMCCAT97 simplification at 27(3), 159–170 rather than to its own paper at 27(1), 49–58. All three were checked against the publisher record; the changed text is marked.
The adaptation curve shows A(t) over the full 5-second timeline. Adjust τ, delay, strength, and initial adaptation in the Lab tab to see how the curve changes. The red dot indicates the current time position. Longer τ produces slower adaptation; higher delay shifts the onset.
90% adapted: t90 = delay + τ · ln(10) ≈ delay + 2.303τ
99% adapted: t99 = delay + τ · ln(100) ≈ delay + 4.605τ
The per-pixel adaptation state map encodes the local adaptation degree as greyscale intensity. White pixels are fully adapted (A ≈ 1), black pixels are unadapted (A ≈ 0). When per-pixel modulation scales are zero, the map is uniform. Increasing τ or delay luminance scales creates spatially-varying adaptation patterns — dark image regions appear darker in the state map (slower adaptation), while bright regions appear lighter (faster adaptation).
This corresponds to psychophysical observations: photopic (bright) adaptation is faster than scotopic (dark) adaptation due to differences in cone vs rod recovery dynamics (Adelson 1982, Hayhoe et al. 1987).
The Actions tab provides a full 8-method comparison at the current A(t). Research findings from this tool:
- Bradford — consistently best for large ΔCCT (> 2000 K) shifts; slight S-cone sharpening improves blue handling.
- CAT16 — superior numerical stability; eliminates CIECAM02 blue instabilities; recommended for new systems.
- CAT02 — adequate for moderate shifts; known instabilities at high chroma in blue (h ≈ 240°, C > 80).
- Von Kries — historically important but less accurate for non-daylight (A, F-series) sources.
- Sharp — aggressive sharpening; can produce out-of-gamut results for saturated stimuli.
- CMCCAT2000 — good performance on textile data sets; less tested on display workflows.
- HPE — close to Von Kries; used internally by CIECAM models before CAT-specific matrices.
- XYZ Scaling — worst-case reference; useful as a lower bound for comparison.
CIECAM02 defines the degree of adaptation D as a function of the adapting luminance LA and the surround ratio F:
F = 1.0 for average surround, 0.9 for dim, 0.8 for dark. At photopic luminances (LA > 200 cd/m²), D → F (near-complete adaptation). At scotopic levels (LA < 1), D drops significantly, reflecting reduced adaptation in dark viewing.
This lab's exponential decay model A(t) is complementary: it captures the temporal dynamics of adaptation at a given adapting level, while the CIECAM02 D formula captures the steady-state degree given environmental luminance. For a comprehensive model, set A∞ = D from the formula above.
During adaptation, colours may temporarily appear outside the sRGB gamut — particularly for large illuminant shifts (e.g., D65 → A). This lab clamps out-of-gamut values to [0, 255] after inverse sRGB gamma encoding. When HDR Tonemap is enabled, a Reinhard global operator compresses super-white values before clamping:
For production workflows, consider perceptual gamut mapping in CIELAB or Jzazbz space rather than simple per-channel clamping. The batch analysis in the Actions tab reports which adapted colours fall outside sRGB gamut.