Skip to content
All apps

Color constancy

About this app

A procedurally rendered still-life scene with warm light and a bluish shadow: an eyedropper proves that a "white" patch in shadow and a "gray" patch in light have exactly identical RGB values. A white-balance slider flips the same pixels between white-gold and blue-black (The Dress mechanics); a context toggle hides the lighting cues — and shows why industrial image processing needs controlled lighting and color calibration.

The idea

Colour is not a pixel value but something the brain works out. It estimates the illumination of a scene and discounts it to recover surface colours. This is colour constancy: a sheet of white paper looks white in bluish shade and in warm light, although a camera records very different values. Without reliable cues about the light source, the same pixel colour can be interpreted in different ways. That explains the 2015 photo known as “The Dress”: people who assumed cool light saw white and gold, those who assumed warm light saw blue and black.

What the app shows

A procedurally rendered still life sits in warm light with a bluish shadow. With the eyedropper you click two spots and compare their true RGB values; a “white” tile in the shadow and a “grey” tile in the light are marked and have exactly the same values. A white balance slider changes the assumed light source from cool to warm, and a fabric ribbon flips between white-gold and blue-black. A toggle hides the lighting cues.

Try it yourself

First measure the two marked tiles with the eyedropper and notice how different they look. Then move the white balance slider and watch the ribbon. Hide the lighting cues: without a visible light source and shadow gradient, the interpretation flips more easily. The technical consequence: cameras have no colour constancy, so industrial machine vision needs controlled lighting, white balance references and colour calibration.

Frequently asked questions

What is colour constancy?
Colour constancy is the visual system’s ability to perceive surface colours as stable under changing illumination. The brain estimates the colour of the light and removes it from the image. A white sheet therefore looks white in daylight and lamplight.
Why did people see The Dress in different colours?
The photo gave few cues about whether the dress was lit by cool or warm light. People who assumed cool, bluish light discounted the blue and saw white and gold. Those who assumed warm light saw blue and black, from exactly the same pixels.
Why do cameras need white balance?
A camera only measures the incoming light per colour channel and has no built-in colour constancy. Without correction, shots look yellowish under artificial light or bluish in shade. White balance compensates for the colour of the light source using a reference.
How do I use the eyedropper in the app?
Click two spots in the scene; the eyedropper shows the true pixel values for points A and B and their difference. It is clearest with the marked tiles in shadow and in light.

Subject: Perception & Illusion

More from Perception & Illusion

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps