Color constancy is a part of the visual perception system which allows people to perceive color in a variety of conditions, and to see some consistency in the color. An apple which is red in the bright morning sunlight will also appear red under candlelight and in the late afternoon, when the wavelengths of the light available are actually very different. Likewise, if the apple is partially in the sun and partially in the shade, an observer will read the entire apple as red. This allows someone to recognize the apple even though the conditions have changed, with the eyes perceiving the color as relatively constant.
This system is part of a larger system of subjective constancy. Subjective constancy is used by the brain to help people perceive objects in changing situations. This ensures that they can recognize those objects, which assists with comprehension of the world and can also become important for safety. For example, the ability to recognize a specific shape might help someone avoid a hazard, and the ability to compensate for distance when viewing a scene can also be important. Subjective constancy also allows people to identify and link thematic elements, as seen when people recognize a work of art because it depicts a familiar scene.
Color constancy uses the input from various cone cells in the retina. The cones are sensitized to varying wavelengths of light, and their collective data is processed by the brain to determine which colors someone is looking at. Colors can be influenced by which wavelengths of light are available, and by surrounding colors, which is why a color can look very different depending on what is placed next to it.
This aspect of the human color perception system was uncovered in the 1970s. It was actually a photographer who identified the color constancy phenomenon, perhaps because photography often requires a very high awareness of color and available light. Color constancy has since been studied extensively to learn more about how people see color, and how perception of color can be distorted.
Many examples used to demonstrate color constancy and the tricks which can be played with color use a grid known as a Mondrian. The grid consists of a series of squares, with the experimenter manipulating available light levels to see how people perceive the colors of the squares. An orange square, for example, may appear red in a different wavelength, and squares of the same color can appear different, depending on which colors are surrounding them.