The eye is often compared to a camera. But it might be more appropriate to compare it to a TV camera with an automatically tracking tripod — a machine that is self-focusing, has a self-cleaning lens, and has its images processed by a parallel processing computer.
When we see, light from the outside world is focused by our lens onto our retina. There, it is absorbed by pigments in light-sensitive cells, called rods and cones.
Many animals have 2 different types of cones. (Some, like birds have 5 or more). Higher primates, including humans, have 3 different types.
Scanning electron micrograph of rods and cones. The outer segments of rods have an untapered cylindrical shape, and those of cones have a tapered conical shape.
The visual pigments have similar amino acids sequences. The colored dots above represent amino acids that differ. Bottom right shows the slight difference between the Long- and Medium- pigments.
The approximately 6 million cones in our retinas are sensitive to range of brightnesses, and come in three different varieties. (Additionally, we have approximately 125 million rods on the retina, which are important for night vision, not color vision.) This graph shows how sensitive the different cones are to varying wavelenths.
For example, the medium code is more sensitive to pure green wavelengths than to reddish wavelengths.
It is interesting to note that the existence of such receptors was first hypothesized by George Palmer in 1777, and more famously a few decades later by Thomas Young... but not actually discovered until the late 19th century.