In order for animals to form a meaningful picture of the world, their visual system need to correctly interpret the form of objects around them. A major component of this is perception of colors.
Perception of color is achieved in primates through color receptors. In primates there are three types color of color receptors that are attuned to (roughly) red, green, and blue frequencies of light. A particular frequency of light (for example, yellow) will stimulate each of these receptors to varying degrees (e.g., yellow light will stimulate red and green receptors strongly, but will only stimulate blue receptors weakly). The visual system combines the information from each type of receptor to calculate the wavelength of the original light. Cones for red and green color perception are encoded in the X chromosome; defective encoding of these leads to color blindness and is more frequent in males than in females.
Other animals enjoying three-color vision include tropical fish and birds. In the latter case multicolor perception is achieved through a single cone type. Brightly colored oil-droplets inside the cones are used to shift the perceived wavelength. Still other species have less effective two-receptor color perception systems, or simple monochromatic, single-receptor systems.
Color perception mechanisms are highly dependant on evolutionary factors. Satisfactory recognition of food sources is the most prominent of these. In herbivorous primates, color perception is essential for finding proper (mature) leaves. In hummingbirds particular flower types are often recognized by color as well. There are some hints as to the importance of ultraviolet and infrared color perception in nature as well.
A given object may be viewed under various conditions. For example, we may see it in the sunlight, in the light of a fire, or illuminated by a harsh electric light. In all of these situations, our visual system tells us that the object has the same color: an apple always appears red, whether we look at it at night or during the day. This feature of the visual system is called chromatic adaptation.
Chromatic adaptation is one of the more easily fooled aspects of vision, and is prone to some of the most spectacular optical illusions.
Color perception
Chromatic adaptation