The painting below show the same colorful cube in red light and green light. The squares on the cube are cyan, magenta, ochre, blue, and white. Or so they seem. What colors are those squares really, objectively?
In fact, the cyan square in the bottom corner of the red-lit scene is exactly the same color mixture as the red square in the upper corner of the green-lit scene.
To test that claim, here’s the same image file with everything but those squares turned to gray tones. Nothing else has changed. The colors of those squares are made from the same paint, applied with the same brush. (The shaded surface side is a slightly redder gray in both cases.)
This phenomenon is called color constancy. We interpret local colors as stable and unchanging, regardless of the effects of colored illumination, the distractions of cast shadows, and the effects of form modeling.
Here’s another example. This powerful optical illusion, created digitally by R. Beau Lotto, is called the cross-piece illusion. Two bars made up of colored cylinders, meet in a junction piece. In one picture, the cross-piece looks blue-gray. In another it looks yellow. In fact it’s precisely the same color. At this link, you can view the illusion with a slider to isolate the actual color.
A fire truck looks red, regardless of whether we see it lit by the orange light of a fire, the blue light the twilight sky, or a blinking light of an ambulance. If the truck were parked halfway in shadow, we would still believe it to be a single, consistent color. If the fender were dented, the tones of red reaching our eyes would change, but we would still believe the red to remain the same.
Our visual systems make such inferences automatically. Color constancy processing happens unconsciously. It’s almost impossible for our conscious minds to override it.
R. Beau Lotto's site
R. Beau Lotto
Wikipedia on Color Constancy