Color constancy

Color constancy: The colors of a hot air balloon are recognized as being the same in sun and shade.
Example of the Land effect. Color constancy makes the above image appear to have red, green and blue hues, especially if it is the only light source in a dark room, even though it is composed of only light and dark shades of red and white. (Click to view the full-size image for the most pronounced effect.)
Constancy makes square A appear darker than square B, when in fact they are both exactly the same shade of gray. See Checker shadow illusion.
Achieving luminance constancy by retinex filtering for image analysis
In these two pictures, the second card from the left seems to be a stronger shade of pink in the upper one than in the lower one. In fact they are the same color (since they have the same RGB values under white light), but perception is affected by the color cast of the surrounding photo.

Color constancy is an example of subjective constancy and a feature of the human color perception system which ensures that the perceived color of objects remains relatively constant under varying illumination conditions. A green apple for instance looks green to us at midday, when the main illumination is white sunlight, and also at sunset, when the main illumination is red. This helps us identify objects.