HomeArticlesPerception

Color Constancy & Chromatic Adaptation

A white shirt looks white in sunlight and under a yellow lamp — even though the light bouncing off it is a completely different color in each case.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

The problem the eye has to solve

The light that reaches your eye from a surface is the product of two independent things: the surface's own reflectance spectrum, and the spectrum of the light illuminating it. A white shirt reflects roughly all wavelengths equally, but the actual light bouncing off it under a warm incandescent lamp is shifted heavily toward orange, and under blue-tinged shade lighting it is shifted toward blue. Your visual system, given only the mixture, has to somehow recover the surface property (roughly white) and discard the illuminant's contribution — a genuinely underdetermined problem, since infinitely many combinations of surface and light could in principle produce the identical retinal signal.

Von Kries chromatic adaptation

The classical model, proposed by Johannes von Kries around 1902 and still the working baseline in color science, is a simple independent rescaling of the three cone signal channels:

L_adapted = L_cone / L_illuminant_estimate
M_adapted = M_cone / M_illuminant_estimate
S_adapted = S_cone / S_illuminant_estimate

L, M, S = the three cone types' raw responses to a point in the scene
*_illuminant_estimate = each cone type's response to the estimated
                         light source (often approximated by the
                         brightest or most common color in the scene)

Divide each cone's response by its own response to the light source, and a surface that reflects light evenly — a gray or white object — comes out looking neutral under almost any illuminant, because its cone ratios were, by construction, dominated by the illuminant's spectrum to begin with and that spectrum has just been divided out. This single mechanism explains most of everyday chromatic adaptation, including why a white sheet of paper still looks roughly white when you carry it from daylight into a room lit by a warm lamp.

live demo · a surface holding its perceived color as illumination shifts● LIVE

Retinex: comparing surfaces, not measuring light

Von Kries adaptation assumes one uniform illuminant across the whole scene, which is often not true — think of a room lit partly by a window and partly by a lamp. Edwin Land and John McCann's Retinex theory (retina + cortex) proposes instead that the visual system computes surface color from spatial ratios: comparing a point's cone response against its neighbors across the scene, rather than against one global illuminant estimate. Because a change in local illumination tends to affect neighboring points similarly while a change in surface reflectance produces a sharp local edge, ratio comparisons at edges recover reflectance information that survives even substantial illumination gradients within a single scene — a real advantage over the single-illuminant assumption of von Kries, at the cost of a computationally heavier, spatially extended process.

Simultaneous contrast

The same comparison machinery that stabilizes color under changing illumination also produces the well-known illusion of simultaneous color contrast: an identical gray or colored patch looks different depending on the color of the surface surrounding it, because the visual system is reporting a relative, contextual value rather than an absolute measurement. This is not a flaw — it is the same relative-comparison strategy that makes color constancy possible in the first place, just made visible by a display that deliberately isolates one patch's context from its physical surroundings.

The dress

The 2015 viral photograph known simply as "the dress" became a striking public demonstration of exactly this ambiguity: the photo's lighting was genuinely ambiguous about whether the scene was lit by bluish light (in which case a white-and-gold dress would produce those pixel values) or warm light (in which case a blue-and-black dress would). Different viewers' visual systems made different implicit assumptions about the illuminant, and those different assumptions — not a difference in the raw pixels, which were identical for everyone — produced genuinely different conscious color experiences, a rare case where the machinery of color constancy became visible to millions of people at once.

Frequently asked questions

What does the von Kries coefficient law actually adjust?

It independently rescales the gain of each of the three cone types (L, M, S) by a factor inversely proportional to that cone type's response to the estimated illuminant. In effect, each cone channel is divided by its own response to a reference white under the current lighting, which cancels out much of the color cast the illuminant would otherwise impose on every surface in the scene.

How is Retinex theory different from von Kries adaptation?

Von Kries adaptation is a single global gain adjustment per cone type, based on an estimate of the overall illuminant. Retinex theory, developed by Edwin Land and John McCann, instead computes surface color from spatial comparisons — ratios of a point's cone response to its neighbors across the scene — which can handle illumination that varies across the scene rather than assuming one uniform light source, at the cost of being a more locally computed and computationally heavier process.

Why did 'the dress' photo split viewers into seeing it as blue-black or white-gold?

The photo's ambiguous lighting gave the visual system too little information to uniquely determine whether the dress was lit by a bluish light (making a white-gold dress) or a warm light (making a blue-black dress appear washed out), and different viewers' visual systems made different implicit assumptions about the illuminant, producing genuinely different perceived colors from the identical pixel values, rather than one group simply being 'wrong'.

Try it live

Everything above runs in your browser — open Color Constancy & Chromatic Adaptation and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Color Constancy & Chromatic Adaptation simulation

What did you find?

Add reproduction steps (optional)