Color Algebra

by Paul Doherty July 97

The Primary Colors of Light

The spectrum of colors

A prism breaks white sunlight up, spreading its component colors out into a spectrum of light visible to the human eye stretching from red through yellow, green and blue to violet. Scientists analyzing these colors find that they have a wave nature, and that one given wavelength of light is perceived as one color when viewed by a person. However there are colors which do not occur in the spectrum, such as magenta, these colors can only be created when two different wavelengths hit the same spot on the retina at the same time. Without human perception there is no color magenta. Indeed there is no white either. Thus to understand color we must understand the human retina.

The human retina has three types of color receptors called cones; long wavelength &emdash; called red, medium wavelength &emdash; green, and short wavelength &emdash; blue. Because of this, almost all of the colors which we can perceive can be created by adding together three different wavelengths of light, these three colors: red, green, and blue, are called the primary colors of light.

White

When red, R, green, G, and blue, B light shine onto the retina in roughly equal amounts then humans perceive white,W. So I can say that W = R+G+B. (This experiment is usually conducted by looking at a white screen illuminated by the three colored lights.) White is not a color of the spectrum. At least two different wavelengths of light (e.g. B+Y) must illuminate the retina at the same time to produce white. Remember, a color in the spectrum, by definition, can be produced by a single wavelength of light.

Yellow

When red and green light shine on the screen, humans perceive yellow. So Y = R+G. Now yellow is also a color of the spectrum which means that yellow is the color humans perceive when the retina is illuminated by a single wavelength of light. The single wavelength for yellow is between the wavelengths for red and green, the yellow causes both the red and green cones to fire nerve impulses. The electrical signal sent to the brain when the eye is illuminated by one wavelength of yellow is similar to the signal sent to the brain by the combination of two wavelengths R+G.

Cyan

Cyan, C, is a color of the spectrum. The wavelength of cyan light is midway between the wavelengths of blue and green. The crayon that used to be called blue-green is now called cyan, C. Cyan can also be created by adding blue light to green light. C = B+G.

Magenta

When I mix blue and red light my eye perceives the color magenta, M. Magenta is not a color of the spectrum: no single wavelength of light can produce the color sensation called magenta. M = R + B.

Mixing Colors

I can use color algebra to predict the color I will create by mixing colors such as Blue and yellow: B + Y = B + (R + G) = W

Two colors which add to produce white are called complementary colors so blue and yellow are complementary colors.

I can also ask this question the other way around What is the complementary color to red?

R + X = W so R + X = R + G + B and X = G + B = C

So red and cyan are complementary colors.

Now figure out for yourself the complementary color to Green. Answer

I could pick other colors to be my primary colors for light, such as red, yellow, and blue. However the number of colors I can produce by mixing red yellow and blue is less that the number of colors I can produce by mixing red, green and blue. Thus red, green, and blue are chosen as the primary colors of light.

The Primary Colors for Pigments

Pigments remove light, usually by converting it to thermal energy. Pigments are used in: paints, dyes, pens, crayons and most colored filters. Chlorophyll of plants is a green pigment. It absorbs red and blue from white sunlight and scatters green.

So the only color light that a plant does not want is?

Green.

In color algebra a green pigment is G = -R-B. The minus signs indicate that red and blue are removed. In terms of color algebra

W -R-B = (R+G+B) -R-B = G

By mixing three pigments you can create the widest range of colors by choosing magenta, cyan, and yellow as your primary colors. In terms of color algebra

• M = -G
• C = -R
• Y = -B.

So each of the primary colors of pigment removes just one of the additive primaries.

When I was in grade school these pigment primaries or subtractive primaries used to be called red, yellow and blue. However, today we know that a wider range of colors can be produced by choosing magenta, cyan, and yellow pigments.

Mixing crayons

Let's use color algebra to calculate what happens when we mix a yellow crayon with a cyan crayon. We shine white light on these pigments.

White light on Cyan (-R) and yellow (-B) pigment

W - R - B = (R + G + B) - R - B = G

So yellow pigment plus cyan pigment equals green. Now I was taught that yellow plus blue crayons produced green, let's see what color algebra says.

W on yellow(-B) and blue(-R-G) pigment.

W -B-(R-G) = (R + G + B) -B -R -G = 0 = Black, K

yellow plus blue pigments equal black. So if a yellow crayon plus an unknown crayon equals green then the unknown crayon is cyan not blue.

A Magenta light on a red apple

Color algebra can also answer questions like what color will a red apple appear when illuminated by magenta light?

Magenta light (R+B) on red pigment (-G-B)

(R+B) - G - B = R (not - G because negative colors are not allowed to be the answer to a question "what do I see" in color algebra, and are dropped from the answer.)

So the apple appears red.

In cyan (B+G) light the apple appears:

C -G-B = (B + G) -G -B = 0 Black.