Chapter 9. Color

RGB and Other Systems

Almost all modern color computer displays display colors by combining varying amount of red, green, and blue (RGB) light. These three colors stimulate the eye’s color receptors and approximate the sensation of viewing various colors; for example, orange light with a wavelength of about 600 nm cannot be produced by a com7puter screen, but emitting a modest amount of green light, a large amount of red light, and no blue light will provoke a sensation in the eyes of most viewers that will be indistinguishable from the sensation of viewing orange light. Color

Tip

Throughout X, color is spelled without a u, reflecting the American origins of the system. However, for those of us raised in Canada, the U.K., or any of the other commonwealth countries, that u is a hard habit to break, and it can lead to all sorts of mischief including syntax errors—so check your u at the door!

Since the perceived colors are created by the addition of three different wavelengths of light, this RGB color is considered to be an additive color system . The red, green, and blue colors used are called additive primaries .

Computer printers, on the other hand, use a subtractive colorsystem. The white paper reflects all visible wavelengths almost evenly; the dyes or pigments deposited on the paper absorb certain colors, effectively subtracting undesired wavelengths from the light reflected by the paper. The colors used ( subtractive primaries) are the complements of red, green, ...

Get X Power Tools 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.