8.2. Physics and Physiology

Color is a property of light, which is electromagnetic radiation. Light has a magnitude, which corresponds to the sensation of brightness. The color of the light is determined by the light's wavelength. Typically, light has some distribution of wavelengths, with a dominant wavelength that determines the perceived color.

In the human eye, the retina contains cells that respond to light. There are two main types of cells: rods and cones. The rods only respond to the intensity of light, more or less without regard to its wavelength. It's the cones that interest us here, because they respond to different colors of light.

According to the tristimulus theory, there are three varieties of cones. Each type of cone has a characteristic response to light of different wavelengths. On a graph, each cone type's response is a curve over the range of visible wavelengths. We'll call these the response functions. Each curve peaks at a different wavelength. The three peak wavelengths correspond roughly to red, green, and blue. (They are not exactly red, green, and blue, and this will cause us trouble later.) Thus, any wavelength (color) of light can be expressed in terms of the responses of the three types of cones.

This is probably starting to sound familiar. A computer monitor produces colors by mixing different amounts of red, green, and blue light (RGB). In a more tidy universe, this would be the end of the story. Using red, green, and blue lights, a monitor should ...

Get Java 2D Graphics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.