Color Constancy, Adaptation, and Why Colors Change with Context
A white shirt looks white at noon, in tungsten-lit kitchens, and at sunset - even though the actual spectrum hitting your eye is wildly different. The visual system pulls off this trick continuously, automatically, and imperfectly. Understanding how, and where it breaks, explains every famous color illusion and most photography mistakes.
Advanced constancy workbench
Color constancy is not one correction. It is a negotiated estimate: cone gains discount the illuminant, spatial comparisons stabilize surfaces, learned memory colors pull familiar objects toward their expected appearance, and a camera-style white balance tries to do the same thing with explicit channel multipliers. This workbench puts those mechanisms in one interactive model.
Separate surface reflectance, raw stimulus, perception, and camera white balance
Choose a surface and an illuminant, then change the amount of adaptation, context, memory-color bias, retinex correction, and camera white balance. The canvas shows why the same retinal stimulus can be interpreted as a changed object, a changed light source, or a partially corrected percept.
The best constancy happens when the visual system can estimate the illuminant from both adaptation and spatial context. Remove context or use a narrow illuminant, and the model has to guess.
What constancy actually is
The light reaching your retina from any surface is the product of two things: reflectance (a property of the surface, fixed across time) and illumination (a property of the light source, hugely variable across a day). The visual system has only the product to work with - but somehow recovers, most of the time, an approximately stable estimate of the underlying reflectance. That stable estimate is what we call the object's color.
Without color constancy, every change in lighting would look like a change in object color. The world would be visually chaotic. With color constancy, the apple stays red as you carry it from the kitchen to the patio, and the white shirt stays white as the sun rises and sets. The system is imperfect - measured constancy is roughly 60-85% across typical illuminant changes - but good enough that surface identity dominates over lighting in conscious experience.
The three sources of constancy
Color constancy is not one mechanism. It is at least three, layered on top of each other, operating at different stages of the visual pipeline and on different timescales.
Together, these three levels produce constancy on timescales from milliseconds (lateral inhibition) to half an hour (full dark adaptation). They also explain why constancy can be partly defeated by removing context - look at a surface through a tube and its color shifts noticeably as the illuminant changes, because the cortical context machinery has lost its scene-wide cues.
Cone adaptation (von Kries)
The simplest and oldest model of chromatic adaptation comes from the German physiologist Johannes von Kries (1902). It says each cone class rescales its gain independently so that the chromatic statistics of the current scene approximate "white." The cone response under the new illuminant is multiplied by a constant - the gain - chosen so the system's perceived white matches the new white point.
The model is crude but works surprisingly well as a first approximation. Modern color-management systems use refined versions of it for cross-illuminant transforms (Bradford, CAT02, CAT16), where the gains are computed in carefully chosen "sharpened" cone bases rather than the raw L, M, S directions.
Apply independent gains to each cone class
Imagine a scene under D65 daylight. Choose a target illuminant. The system computes the per-cone gains needed to keep the scene's "white" stable. Notice that real chromatic adaptation does not just shift the whole image uniformly - it rescales each cone class differently.
Spatial induction
Cones rescale to global averages. But the retina also performs local rescaling through lateral inhibition - each cell's output gets pulled toward whatever its neighbors are doing. The consequence is simultaneous contrast: a patch surrounded by a bright region looks darker; surrounded by a saturated red, it looks more greenish. The eye is reporting contrast against the surround, not absolute lightness or color.
The same patch looks different against different backgrounds
Both center patches are physically identical. The left surround pushes the patch's apparent color one way; the right surround the other. Try toggling between chromatic contrast (red vs green surround) and lightness contrast (dark vs light).
Both center patches are the same color.
Land's retinex theory
In the 1970s, Edwin Land - inventor of the Polaroid camera - mounted a striking demonstration. He projected three black-and-white slides of a colorful "Mondrian" scene through red, green, and "white" filters, and varied the intensities so that the light from any one patch could be made physically identical across very different filter conditions. Observers still saw the underlying colors correctly. The final color of a patch did not depend on its local light - it depended on the relationships across the whole scene.
Land's Retinex theory (1977) was the first serious attempt at a computational model of color constancy. It proposed that the visual system computes each cone-class lightness independently by integrating edge ratios across the scene - effectively reconstructing reflectance from a network of local comparisons. The model still influences computer-vision algorithms half a century later.
Match a patch across two illuminants
A schematic Mondrian made of colored rectangles, shown under two different illuminants. The patches marked with a yellow dot send physically identical light to your eye in both panels - but they look like different colors, because the surrounding scene supplies different white-point evidence. That gap is constancy in action.
Yellow dots: physically identical stimulus, very different perceived color.
Chromatic adaptation transforms
Modern color-management systems implement chromatic adaptation as a 3×3 matrix transform between XYZ tristimulus values under different illuminants. The most widely used transforms - Bradford, CAT02, and CAT16 - all share the same structure: convert XYZ into a "sharpened" cone basis, apply independent von-Kries-like gains, then convert back to XYZ.
von Kries (1902)
Raw L, M, S basis. Simple but inaccurate near color gamut boundaries. Mainly of historical interest now.
Bradford (1985)
Sharpened cone basis derived by Lam from extensive corresponding-color experiments. Still widely used in ICC profile workflows.
CAT02 (2002)
The matrix at the heart of the CIECAM02 appearance model. Better near gamut edges than Bradford but susceptible to negative-LMS artifacts.
CAT16 (2016)
Refined replacement for CAT02. Avoids the negative-LMS pathology and used in the newer CIECAM16 model. Often the recommended default today.
Apply Bradford, CAT02, and CAT16 to the same image
Each panel shows the same source scene transformed from a D65 white point to your chosen target white using a different chromatic adaptation transform. The differences are small but real, especially in saturated colors.
The famous illusions
Color constancy works by making assumptions about the scene. When those assumptions are wrong, the conclusions are too. The most famous color illusions are not failures of the visual system but consequences of its normally correct reasoning applied to unusually crafted images.
Click any illusion to see and explain it
Memory color
Constancy gets help from learning. Skin, sky, grass, bananas, and Coca-Cola red have memory colors the visual system has internalized over a lifetime of viewing. When light is ambiguous, the brain biases its interpretation toward the memorized typical color. Show a person a desaturated banana and ask them to adjust it until it looks gray - they will overshoot toward blue, because their internal model "knows" the banana should be yellow.
Set a banana to "pure gray"
Adjust the banana until it looks pure gray to you. The hex of your "gray" is shown underneath, alongside the actual neutral. People with strong memory-color biases typically settle on a slightly blue setting because their internal banana is yellow.
When constancy fails
Three conditions reliably defeat color constancy. Knowing them is useful for both designers (avoiding them) and illusion designers (exploiting them).
CIECAM and appearance models
CIELAB gives you device-independent coordinates for a color under standard reference conditions. But it does not predict how a color will actually appear when conditions change - viewing angle, surround, background, luminance level, or partial adaptation. Color appearance models (CAMs) fill this gap.
The current standards are CIECAM02 (2002) and its successor CIECAM16 (2016). Both take an input stimulus plus a description of viewing conditions and output six appearance correlates: lightness, brightness, chroma, saturation, colorfulness, and hue angle. These are designed to capture the way a color actually looks, not just where it sits in XYZ space.
Cameras vs eyes
Camera sensors do not have constancy. They record what hits them. To make photographs look natural, every camera system performs white balance - an explicit, software-driven version of biological chromatic adaptation. White balance multiplies the R, G, and B channel gains so that something the camera thinks is white actually comes out white in the final image.
Test your understanding
Six questions on constancy, adaptation, and context. Wrong answers come with brief explanations.
Quick check
Continue your journey
Vision in Dim Light: Rods, Scotopic Vision, the Purkinje Shift
Dark adaptation - the eye's biggest adjustment as light falls away.
Colorimetry · 41Color Appearance Models: CIECAM
The math model of the adaptation this article describes.
Vision · 30Color Illusions and the Limits of Perception
Constancy caught in the act - afterimages, contrast, and 'the dress'.
Physics · 28Color Temperature and White Balance
The device-side counterpart to the eye's automatic white balance.
Foundations · 01What Color Is and How Humans See It
The cornerstone explainer connecting light, surface, eye, brain, and standards.
Foundations · 02History of Color Science from Newton to Hering
Three centuries of color thought, with interactive prism and opponent demos.
Physics · 04Spectral Power Distributions and Why RGB Is Not Enough
The illuminant side of the constancy equation.
Vision · 05Human Color Vision: Cones, Opponent Signals, and the Brain
The biological pipeline behind every adaptation mechanism.
Vision · 06Color Blindness and Color Vision Deficiency
What happens when the receptors themselves vary - genetics, testing, accessible design.
Colorimetry · 08CIE XYZ Explained
The reference frame in which chromatic adaptation transforms are defined.