number by colors || defining colors—the cie color diagram

31
CHAPTER 5 Defining Colors-The C/f Color Diagram Introduction-The CIE Color Diagram In the previous chapters, color has always been defined in terms of three num- bers, or equivalently, a position in 3-space. But defining colors in terms of 3-space coordinates is a bit awkward: it is difficult to publish a 3-space chart in a book, for example. Is there a way to describe colors in terms not of 3-space coordinates, but of a fiat, 2-space coordinate? Of course. Most people define colors now in terms of their location on a two-dimensional graph known as the 1931 eIE chromaticity diagram (CIE stands for Commission !nternationale de l'gclairage). This diagram is very fa- mous, or some would say infamous. It has been sworn at, modified, trans- formed, vilified, but never ignored. The history of color description and reproduction in the 20th century revolves around this diagram. Hence this chapter. Parts of this chapter may seem arcane, or overly mathematical. But unfor- tunately, these sometimes bizarre details are needed to explain the CIE chro- maticity diagram in all its glory. And to understand the modern use of color, there is no getting around the fact that you need to understand CIE. Enjoy. Number by Colors 87 B. Fortner et al., Number by Colors © Springer-Verlag New York, Inc. 1997

Upload: theodore-e

Post on 20-Dec-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Number by Colors || Defining Colors—The CIE Color Diagram

CHAPTER 5 Defining Colors-The C/f Color Diagram

Introduction-The CIE Color Diagram

In the previous chapters, color has always been defined in terms of three num­bers, or equivalently, a position in 3-space. But defining colors in terms of 3-space coordinates is a bit awkward: it is difficult to publish a 3-space chart in a book, for example. Is there a way to describe colors in terms not of 3-space coordinates, but of a fiat, 2-space coordinate?

Of course. Most people define colors now in terms of their location on a two-dimensional graph known as the 1931 eIE chromaticity diagram (CIE stands for Commission !nternationale de l'gclairage). This diagram is very fa­mous, or some would say infamous. It has been sworn at, modified, trans­formed, vilified, but never ignored. The history of color description and reproduction in the 20th century revolves around this diagram. Hence this chapter.

Parts of this chapter may seem arcane, or overly mathematical. But unfor­tunately, these sometimes bizarre details are needed to explain the CIE chro­maticity diagram in all its glory. And to understand the modern use of color, there is no getting around the fact that you need to understand CIE. Enjoy.

Number by Colors 87 B. Fortner et al., Number by Colors© Springer-Verlag New York, Inc. 1997

Page 2: Number by Colors || Defining Colors—The CIE Color Diagram

88

Chapter 5: Defining Colors-The c/f Color Diagram

Questions for Defining Colors-The CI E Color Diagram

1) What is the eIE color diagram, and why do I care?

2) It is often said that three properly chosen primary colors can be used to generate all other colors. This statement is false. Why?

3) No known output device such as a printing press or a laser printer can generate an accurate image of the eIE Diagram. Why?

4) Why do color printouts of an image often look different than the same image on a computer screen? Is it just flaky software, flaky hardware, or something more fundamental?

From Three Dimensions to Two

We first describe color in three dimensions, and then show how we can elim­inate one of those dimensions. We start with the color cube.

The Color Cube

Suppose you wanted to describe a color in terms of amounts of red, green, and blue. This description would define a position in a color cube, as shown in Figure 5.1. The (0,0,0) corner defines black. The (1,1,1) corner defines white. Pure red, green, and blue would be at three corners of the cube, with cyan, magenta, and yellow at other corners.

Figure 5.1. Color Cube, representing any possible values of red, green, and blue, which are assumed to each go from 0 to 1 . The verti­ces are labeled with their corresponding colors.

Number by Colors

~ ______ "",1, 1, 1

1 c ~ /----­~ ,o~fl; ....

."

··0,0,0 red-

Page 3: Number by Colors || Defining Colors—The CIE Color Diagram

From Three Dimensions to Two

Figure 5.2. Same as Figure 5.1, but rotated 45 degrees.

Now it might be interesting to rotate the this cube 45% so black is at the bottom, and white is at the top. You can see such a rotation in Figure 5.2.

This is a very interesting figure for several reasons. First, the vertical line from top to bottom defines various intensities, from black to white. Second, saturation, or the purity of the color, always increases as distances from the vertical axis increase. You can see this by noting that on the vertical axis, the Red, Green, and Blue values are identical, which produces white or gray.

The third reason that this figure is interesting is perhaps less intuitively ob­vious. If you create a vertical plane that emanates from that vertical axis, the hue on any particular plane is always the same. You can see this perhaps more clearly in Figure 5.3, where we have labeled the vertices with their colors, and

Figure 5.3. Same as Figure 5.2, but with labels showing colors at vertices, and a vertical slice through cyan . Note how the intensity increases with height. Note also that cyan is on the vertex that is hidden by the verti­cal slice. A color version of this figure is shown in Plate C1 in the Color Insert.

Number by Colors 89

Page 4: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Of Color Diagram

added a vertical slice. All the colors on that slice are various hues of yellow, albeit with differing intensities and saturations.

This rotated figure gives us a geometric way to convert a color specified by red, green, and bll/e to a hl/e, satl/ration, and intensity. The intensity is the height along this new vertical axis, the saturation is the distance from this vertical axis, and the hl/e is the horizontal angle around this vertical axis. So by rotating our RGB color cube by 45°, we have turned it from an RGB space into an HSI space.

The Color Circle and Color Triangle

Our color cube is still in three dimensions. Our next step therefore is to get rid of one of those dimensions. The common choice is to eliminate the in­tensity dimension, and describe it separately. We can illustrate how we can get rid of this dimension by taking a series of horizontal slices through Figure 5.2, as shown in Figure 5.4.

The intensity of a color on each of these horizontal slices is a constant. Note also how the location of the various pure colors stays a constant, in that cyan is always at the top, red is always at the bottom, and so on. The only dif­ferences between the three slices (besides the obvious difference in intensity) is the shape: some slices have three sides, some six.

Figure 5.4. Same as Figure 5.2, but showing horizontal slices though the cube. We have labeled the slices with the corresponding colors. A color version of this figure is shown in Plate C.2 in the Color Insert.

90 Number by Colors

c. .oIIow

Page 5: Number by Colors || Defining Colors—The CIE Color Diagram

From Three Dimensions to Two

Figure 5.5. A Color Circle and a Color Triangle. In both figures, all hues of a particular intensity can be represented. The two figures are logically equivalent to each other, in that one can be warped into the other through an orthogonal transformation. A color version of this figure is shown in Plate C.3 of the Color Insert.

green

green

magenta

It turns out that the shape is not important. What is important is the con­cept of a two-dimensional surface of colors, all of the same intensity. By spec­ifying a location on this surface, along with an intensity value, one can in principle specify any observable color.

So what shape should one use to describe colors? It's a matter of taste. Some people use a color triangle, also known as Maxwell's 1 Triangle. Another com­mon shape today is the circle. Both these choices are shown in Figure 5.5. Note that the shape does not matter, because a circle, triangle, or hexagon can always be warped into each other. This concept of warping becomes very im­portant when we get to the CIE diagram.

But, of course, life cannot be that simple, or this chapter would be very short. As one example of a simple complication, you may notice that even though we have tried to ignore intensity in this color triangle, you cannot re­ally. That's because as you move a horizontal slice up and down this color cube, the size of the allowable region changes. Near the top and bottom, for example, there is very little range of colors between 0 and 100% saturation.

But the most important complication is deciding what we mean by the three axes: red, green, and blue. Do they represent monochromatic light sourc­es, or the response curves of our cones? Choosing what RGB means is the focal point of CIE diagram debates that have gone on for decades, as you will see.

1. After James Clerk Maxwell.

Number by Colors 91

Page 6: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Clf Color Diagram

Figure 5.6. A color triangle, where the axes are defined by the responses of the red, green, and blue cones of the eye. The region designated by gray is prohibited because of the overlapping sensitivities of the cones. For example, it is impossible to elicit a strong response from the green cones without some response from the blue or red cones.

92

B R d

Selecting the Primary Colors

With the color cube we are trying to define a color uniquely by three num­bers: a red, green, and blue value. But what do those three numbers represent? Do they represent the responses of the three cone systems in our eye? Or do they instead represent the intensities of three light sources that we call red, green, and blue?These two choices may seem the same, but they are not. They are very different!

Response Curves for Color Cube

First, suppose that the red, green, and blue axes refer to the response curves of our three cones. One problem with this is that every individual has different spectral response curves for each cone system. A second problem is that when the CIE color system was first invented, the average response curves were not even known.

But let us assume for a second that we knew the response curves. Let us also assume that the red, green, and blue values assigned to a color refer to the re­sponse of our red, green, and blue cones. What implications would that have for our color cube or color triangle?

The most important implication is that the cube would not be filled . Some triplet values would not be allowed, as we discussed in the last chapter. An ex­ample of a prohibited region of the cube would be where the green response is at a maximum and red and blue are near zero. This is not an allowed sensa­tion, because of the overlap of the red and green sensitivities of our eye.

Number by Colors

Page 7: Number by Colors || Defining Colors—The CIE Color Diagram

Selecting the Primary Colors

In Figure 5.6, we show a color triangle (which, recall, is a slice out of the color cube at a particular intensity), where the red, green, blue values repre­sent eye sensitivities. The shaded area in that figure shows the region that is not possible.

The problem here is that it is exceptionally difficult to measure a unique response to the three cone systems in humans, as discussed in Chapter 2. Not only that, but there is enormous variation from person to person of the cone responses. This system is therefore not a practical way to specifY colors; we cannot use real cone responses to define any hue.

Light Spectra for Color Cube

Now let us assume instead that we used three light sources as the three axes of the color cube. This is a very natural way to describe colors; a particular hue can always be represented as a mixture of three primary colors. But that begs a question. What kind oflight sources should we use for those three pri­mary colors?

One may at first assume that the best red, green, and blue lights would be ones that matched the response curves of our eye as shown in Figure 5.7. Not so! For example, consider red: a light that had a spectrum the same as the red cone response curve would stimulate a lot of the green cone also. In fact, such

Figure 5.7. Absorption of light by the red, green, and blue cone systems as a function of wave­length. This figure is a copy of Figure 2.12.

Number by Colors 93

Page 8: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Of Color Diagram

Figure 5.8. Intensity curves of three mono­chromatic light sources. We have also included the cone absorbence curves for reference.

g

~ 40

94

30

20

&50 700

.5! " ~ ~ j 1 l!- e; '" i- t "'0 oS !l ~ "3 e; j e;

;; :>-

a light would look yellow to the eye.You would need a monochromatic light with a wavelength past 650 nm to generate a really deep red, something with very little green.

So perhaps the best three colors would be three properly chosen mono­chromatic lights, say, at 435.8nm (blue), 546. 1 nm (green), and 700nm (red) .2 It turns out that it does not matter: there is no way that any three lights can generate all possible colors. See Figure 5.8.

But wait. Haven't we spent half the book saying that any color can be gen­erated by three properly chosen colors? Well, yes, that statement is also true. That statement and the previous statement are subtly, ever so slightly, differ­ent. Any color sensation can be generated by three properly chosen lights; that is true. However, different color sensations may require a different set of three lights. There is no way that three lights with fixed spectra can generate all the colors!

2. You may suspect that these wavelengths were not randomly chosen. You would be right. See page 98.

Number by Colors

Page 9: Number by Colors || Defining Colors—The CIE Color Diagram

Selecting the Primary Colors

Figure 5.9. Here we show a color triangle defined by three light sources. As dis­cussed in the text, the curve outside the triangle is that generated by a monochromatic light, showing that no three light sources can generate all possible colors. You can consider the coordinates of this figure as arbi­trary, although we define them pre­cisely in the next few pages.

0.90

0.80

0.70

0.60

0.50

0.40

0.30

0.20

0.10

o o 0.1 0 0.20 0.30 0.40 0.50 0.60 0.70 0.80

For example, suppose we have chosen those three monochromatic lights mentioned previously. There is no way that those three lights can generate a color as pure as a single monochromatic light at, say, 500 nm (blue-green). So no matter what three light sources we select, there will be some colors that will not be reproducible 'by our three lights. They will be outside the color cube or color triangle.

In particular, the most difficult colors to match with three primary color lights are monochromatic light sources. Imagine a tunable monochromatic light source that can sweep across the visible spectrum. This light source will trace out the line shown in Figure 5.9. Note how virtually the entire curve is outside the color triangle. This curve is known as the spectrum locus.

The CIE 1931 Diagram

So let us get back to ClE, the organization that in 1931 tried to standardize the definition of colors. They decided to define colors in terms of the sensor response curves. But how is that possible? We have already said that the human

Number by Colors 95

Page 10: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The c/f Color Diagram

Figure 5.10. The arbitrarily chosen CIE cone response curves. I.!! ~IE-spe~k, they are known as the X, Y, and Z imagi­nary primaries, or sometimes, color­matching functions.

96

e. !l ~ ~ ~ j ~ ~ ~ .?

iii U U ~ 8 8 -'J

i -5 e. ! ~ ~ iii iii .? .. l

"" '"

cone response curves were not even known in 1931. What the CIE did, then, was to choose a completely arbitrary set of three response curves, with little basis in physiology.

Part of the reason that they chose this way of defining color space was mathematical; it is not trivial to describe an unknown color in terms of three light sources with arbitrary spectra, and requires an assumption of eye re­sponse curves anyway.

On the other hand, with sensor response curves it is very easy mathemati­cally to define the location in 3-space or 2-space of an arbitrary light source. But once again, the then unknown eye response curves have to be assumed. Conceptually, this was not a big problem; to convert to the correct curves would just be a simple mathematical transformation. The assumed CIE re­sponse curves are shown in Figure 5.10. The curves are known as the X, Y, and Z imaginary primaries.

Number by Colors

Page 11: Number by Colors || Defining Colors—The CIE Color Diagram

Selecting the Primary Colors

To calculate three values of an arbitrary light source, you can use the pro­cedure discussed in Chapter 3, "Light Spectra to RGB."There we described how you multiply the source spectra by the (now imaginary) response curves, and then take the area under the three resulting curves. Here we designate the area under each of those three curves as X, Y, and z (note there is no "-"). Note that we do not call the values "red", "green", and "blue," because the response curves that we used to calculate those areas are arbitrary, and do not represent the red, green, and blue responses of our cones.

The next step is to convert this three-dimensional color space defined by x, Y, z into a two-dimensional color space by getting rid of the intensity. We do this by dividing each value by the total intensity of X + Y + Z, as shown in Equation 5.1. We then arrive at three normalized values for X, Y, and Z, here called x, y, and z. Note that x + y + z = 7.

X x=X+Y+Z

y y= x+y+z

Z z= x+y+z

(Eq.5.1)

What have we gained? We still have to use three values to specify a color hue, right? Nope. Because z = 1 - x - y, we never need to specify z; it can always just be calculated. So we can now plot any conceivable color hue on an x, y

graph, where x, y represent the normalized areas under the X, Y imaginary re­sponse curves. And that is exactly what the CIE 1931 diagram is.

The final result, the 1931 CIE Diagram: In Figure 5.11 we have mapped the spectral locus onto the x,y plane, and labeled regions with approximate colors.3

Now if there were no overlap in the imaginary primary sensor curves, then perceivable colors would fill the entire triangle outlined in Figure 5.12. But there is overlap, so there are regions of the x,y plot that are not perceivable. All

3. Although we of course cannot generate a color diagram in a grayscale book, we have reproduced a color version in the color insert. However, even that version is only an approximation; reproducing the CIE diagram is problematic, as we discuss on page 115, "Reproducing the CIE."

Number by Colors 97

Page 12: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Clf Color Diagram

Figure 5.11. The ClE 1931 Diagram, which maps all possible color hues on an x, y color plane. Almost all visualizable colors can be located inside the closed figure on this graph. The curved line is the spec­tral locus. The corre­sponding frequencies in nanometers are listed in italics around the spectral locus. A color version of this figure is shown in Plate C.4 of the Color Insert.

0.90,········

0.80.···

0.70 •....

0.60 • ················(;'eeo"

500nm

0.50."

0.20

0.10

o o 0.10

-_ .. _ ........... ~

--_ ... + ... __ ...

0.20 0.30 0040 0.50 0.60 0.70 0.80 x

perceivable colors fall inside the spectral locus. Recall that this is what we would expect because the CIE diagram was created using sensor response curves instead of primary colors.

98

Why X, V, Z?

This is all fine and good, and we could have done a similar mapping with any set of three imaginary sensor response curves. But why did the CIE choose such a strange set, one that seems so different from what we know are the real response curves?

We have not been able to find a definitive answer to this question. How­ever, there are some possible clues to the source of Figure 5.10. Let us return to those three monochromatic light sources at 435.8 nm (blue), 546.1 nm (green), and 700 nm (red).

Number by Colors

Page 13: Number by Colors || Defining Colors—The CIE Color Diagram

Selecting the Primary Colors

In the 1920s experiments were done with these exact wavelengths of monochromatic light. Experimental subjects were asked to adjust the inten­sities of these three light sources to match the color of a pure monochromatic light, as that pure light was swept across the visible range. The result of those experiments is shown in Figure 5.13.

So, for example, to match a monochromatic light source at a wavelength of 600 nm, the subject had to adjust the brightness of the 700 nm light source to .35, and the intensity of the 546.1 nm source to .07 (with the 435 source to zero), to match the color exactly.

There is something strange about this figure, though . The 700 nm light source curve goes negative between 546 nm and 435 nm! What on earth could this mean? How can the intensity of a light source go negative? What it means is that, as we talked about previously, there is no way those three light sources can generate a color as pure as a single monochromatic light around 500 nm. So, by convention, negative values on this graph mean that a partic­ular amount oflight intensity from the light source is mixed in with the sam­ple light, to desaturate it.

Now even though Figure 5.13 is not the same as our imaginary response curves, it clearly must be related in some way to those curves. One reference suggested that CIE first tried to use Figure 5.13 as their imaginary response

Figure 5.12. The triangle formed by the two axes and the diagonal line shows the allowable region of x and y values if there were no overlap in the imaginary primary response curves. As before, the shaded region shows the allowable region with the imag­inary primaries defined in Figure 5.10.

Number by Colors 99

Page 14: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Clf Color Diagram

0.4

Figure 5.13 . Curves that show the amount of light from three monochromatic light sources at 438.1 nm, 546.1 nm, and 700 nm, needed to match a mono­chromatic light of wave­length shown by the horizontal axis. A nega­tive value on this graph means that the corre­sponding light source had to be added to the source light.

-02 350 400 450 500

~ ... 550 600 650 700 75C

Way , ngth (nml

100

1 ~ ~~ ! ! j ~ l ~ iD ~ c5

~ J ~ -'j

7 5 iD j ~ iD

~ '"

curves. However, Figure 5.13 has a small problem; it is possible for some col­ors to produce negative values of x,y. This must have struck some people as unaesthetic.

So, apparently, CIE modified the curves so there were no negative values. Anyway, compare Figures 5.13 and 5.1 O.They are very similar, except that the negative part of the red curve has been flipped and made positive. Also, the sizes of the three curves have been adjusted so each encloses the same area. Apparently, CIE just flipped the sign on the negative part of the red curve (and moved it down a bit towards blue, it seems) , to force all x,y values positive.

Recall, however, that the curves do not matter very much; any set of rea­sonable response curves will work, in that all colors can be mapped to a par­ticular two dimensional region. It's just a matter of what shape you want that two-dimensional region. Note also that although Figure 5.13 is related in some way to the cone response curves shown in Figure 5.7, they most defi­nitely are not the same thing. The former figure shows the mixing ratios for three arbitrarily chosen monochromatic lights. With different lights, you will get different curves.

Number by Colors

Page 15: Number by Colors || Defining Colors—The CIE Color Diagram

Selecting the Primary Colors

CIE 1976

The CIE diagram is a wonderful tool, as we discuss shortly. But it does have a couple of problems. The first is the fact that is uses such funny curves. Why not the real ones, now that we know them? The answer is probably pretty ob­vious, the same reason that all of us use QWERTY keyboards on our comput­ers, even though Dvorak keyboards are superior. That reason is plain old historical inertia.

Anyway, the second problem is that the 1931 CIE diagram devotes an enor­mous amount of real estate to various green shades, and smunches together other, more differentiable shades. In 1976 CIE tried to correct this second problem by introducing a revision to 1931. This new chromaticity diagram is known, imaginatively enough, as the 1976 CIE chromaticity diagram, as shown in Figure 5.14.

The advantage of this figure is that the distance between two points was now proportional to the perceived color difference, something most definitely not true in the 1931 diagram. But as usual, historical inertia won out over technical superiority: one almost never sees the 1976 CIE diagram; the 1931 version is de rigueur even today.

0.50 : ... t--.....:.:.::.; ..

Figure 5.14. The 1976 version of the CIE chromaticity diagram. The diagram has been warped so that the change in color hue between any two points in the diagram is approximately equal to the distance betwen those two points, for ailloca­tions on the diagram.

DAD : ..

0.10 i·

o ~ ..... o

Number by Colors

--- -- _ ..... ~

0.10

Yellow

700nm

... ~~~ ............................................ i ................................ . 0.20 0.30

X

0040 0.50 0.60 0.70

101

Page 16: Number by Colors || Defining Colors—The CIE Color Diagram

102

Chapter 5: Defining Colors-The Of Color Diagram

Describing and Mixing Colors on the CIE

So now we have a standardized two-dimensional diagram mapping our hue and saturation. Why have we bothered?

We have bothered for the following reasons: the first is that having a stan­dardized way of talking about colors is useful in its own right. Given the prob­lems of reproducing colors accurately (which we cover in the next chapter), there is no guarantee that the blue-green that I talk about is the same blue­green that someone across the country is describing. So, instead, I could give him the coordinates of the color on the CIE diagram.

The second reason is that the diagram has properties that make it very use­ful for working with colors, as we now describe.

Describing Colors on the CIE

It is straightforward to prove mathematically that any arbitrary light source spectrum must be located inside the spectral locus. Recall that the spectral 10-cus was created using a pure monochromatic light source. Any real light source is a broader mixture of wavelengths, and hence would not have as ex­treme values for x, y as the locus.4 This is easy to understand intuitively also: the spectral locus was created with a monochromatic light source.

In the preceding discussions we have described the mathematical procedure for locating a color on the CIE diagram. Can we extract the hue and saturation of that color by its location in the diagram? No problem! Hue would corres-

Calculating the Of Location

Here we summarize the procedure for calculating the CIE location of an arbitrary light source. First you multiply your input spectra by the three imaginary response curves shown in Figure 5.10. Next you take the area under each of the three resulting curves, to arrive at the numbers X, Y, and Z. The x,y coordinates of the color on the CIE diagram are just x = X/(X + Y + Z), y = Y/(X + Y + Z) (the corresponding z coordinate is just z = 7 - x - y). This procedure is very similar to that described in Chapter 3.

4. Although we have been talking about additive colors throughout the last few chapters (color lights), the CIE diagram works almost as well for subtractive col­ors (printing and painting). We talk more about this in the next chapter.

Number by Colors

Page 17: Number by Colors || Defining Colors—The CIE Color Diagram

Describing and Mixing Colors on the Of

Figure 5.15. The CIE diagram, showing how one calculates hue and saturation, by drawing a line from the white point of the diagram to the color in question. Where an extension of that line intersects the CIE boundary is considered the hue, and the ratio of the distance to the color from the white point to the total distance to the curve is con­sidered the saturation. The com­plementary color is the point on the opposite side of the white point that is the same relative dis­tance to the ClE boundary as the original color.

0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80

X

pond to the wavelength on the spectral locus to which the color is closest. 5

Saturation would be proportional to how close the color is to the spectral locus.

This procedure, however, sounds a little vague; how do we quantify the color's closeness to the spectral locus. We can quantify it by first defining what is known as a white point, the location on the CIE that defines white. By con­vention, the CIE diagram white point is defined as the point where X = Y = z, analogous to an exact mixture of red, green, and blue. 6 The corresponding coordinates on the CIE diagram are therefore x =1 /3, Y = 1/3.

5. This does not work in the same way for purple (magenta). Strictly speaking, purple hues are not pure hues, because we require two monochromatic beams to generate purple. However, we can often treat them as such, because the straight line represents in some sense the purest possible combinations of red and blue. The hue on the purple line would just be the ratio of the red to blue colors.

6. Because the X, Y, Z response curves are arbitrary, this definition of the CIE white point is also somewhat arbitrary (if mathematically simple). Many people use other definitions for the white point, which we describe in more detail on page 111, "White Points." Note that some graphics file formats allow the exact speci­fication of the white point individually for every image.

Number by Colors 103

Page 18: Number by Colors || Defining Colors—The CIE Color Diagram

104

Chapter 5: Defining Colors-The Of Color Diagram

Therefore a more precise procedure for calculating the hue and saturation of a color would be to draw a line from the white point through the color under discussion, and continue that line out to the spectral locus. The inter­ception of that line with the spectral locus would be the hue, and the distance of the color point from the white point (relative to the distance from the white point to the spectral locus) is the saturation,7 as shown in Figure 5.15.

By the way, this line between the white point and the color under discus­sion has yet another useful feature. If this line is extended backwards, the in­tersection of the line and the spectral locus defines the complementary color of the given color. The complementary color is in some sense the opposite of a color; we explain this concept in Chapter 6.

Mixing Colors on the CIE

The CIE diagram is useful in specifying the hue and saturation of a color. It is also useful in specifying how two arbitrary (additive) colors add, as you will see. Imagine you had two light sources, with spectra that correspond to dif-

Figure 5.16. Two lights shining on a white screen. The ClE location of the mixture of the two colors is always on the stra ight line connecting the two light sources, as shown in Figure 5.17. The exact position on the line depends on the relative intensities of the two lights.

7. For some reason, most CIE discussions use the terms domil1al1t wavelength and purit), to express the concepts of hue and saturatiol1, respectively. As far as we can tell, these terms are synonyms.

Number by Colors

Page 19: Number by Colors || Defining Colors—The CIE Color Diagram

Describing and Mixing Colors on the Clf

ferent locations on the ClEo The two light sources are shown in Figure 5.16, the corresponding CIE diagram in Figure 5.17.

What is the location on the CIE diagram of the various mixtures of these two lights? Just this: all color mixtures are a straight line between the CIE lo­cations of the two lights. This useful feature occurs because the conversion of a spectrum to x,y coordinates is linear, so the movement from one x,y source to another also has to be linear (as opposed to some higher power: x2, x3, and so on).8

Now let's suppose that we have three lights instead of two, as shown in Figure 4.1 on page 67.What is the range of colors that you can generate with these three lights?

Recall that with two lights, all the colors that can be generated by those two sources fit on a straight line between the CIE locations of the two lights. Fur-

FigureS.17. TheCiE 1931 diagram, showing the location of two arbitrary light sources (A and B), and a straight line that connects the two. Any mixture of the two light sources must be on that straight line.

0.90,···

... : .............. i .............. ~ ............ ··1 ............. ; .

.... : 550nm

.......... :.... 40% A

............ 1" ........... , .............. ; ....... / .... , ~ight Sou:ce B :

620 nlll ~ . 6JOnm :

......... : "6;frTlfiff";

,"OOnm

0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 X

8. This linear relationship is true for color lights (additive colors). It is not true for sub­tractive colors such as photographs or color printing. See Chapter 6 for a descrip­tion of subtractive colors on the ClEo

Number by Colors 105

Page 20: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Clf Color Diagram

0.90

0.80

Figure 5.18. The ClE diagram with the location of three light sources labeled G, R, and B, and lines connecting those three sources. All the colors that these three additive lights can gen­erate must be contained within this triangle.

0.70'

0.60

0.50 '

106

0.20

0.10

o o 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80

X

thermore, the ratio of the intensities of the two lights mapped exactly to the distance of the resultant color along that line, as shown in Figure 5.17.

With three lights, all the colors that can be generated fit inside the triangle defined by CIE locations of the three lights. An example is shown in Figure 5.18. Finding the corresponding location of a source given the relative intensities of the three lights is more involved than the case of two lights, but it is still relatively straightforward mathematically. Basically, the red and green relative intensities are calculated by the ratio of the angles shown in Figure 5.19, with the blue relative intensity just being the value needed so that all the relative intensities sum to one.

Primary Colors on the CIE

We have actually arrived at a very important result with Figure 5.18. With it we can explain a couple of things. The first is why the statement that all color perceptions can be generated by just three colored lights is not quite true. This is be­cause three colored lights can only generate the color perceptions inside the triangle outlined by their CIE locations. There is no way that any single tri­angle can span all of the CIE diagram!

Number by Colors

Page 21: Number by Colors || Defining Colors—The CIE Color Diagram

Describing and Mixing Colors on the Of

The second thing that this figure explains is why there is no firm agreement on what people should use for the three primary colors. There is no obvious choice for three colors that map the maximal color space.9

So some people use red,greell, and blue, some use cyan (blue-green), magenta (purple), and yellow, and others use red, yellow and bille. And even among peo­ple who use red, green, and blue, there is absolutely no agreement on the CIE coordinates for their red, green, and blue.

Much of this lack of agreement has to do with the mechanics of color re­production. For example, there may be particular phosphors for computer monitors and televisions that are better than others, but have different CIE coordinates.

Figure 5.19. You can calculate the relative intensities of light sources R, G, and B to generate the color C by calculating the ratio of the angles LRgC to LRgG to get the relative green intensity, and the ratio of the angles LCrG to LRrG to get the relative red intensity. The relative blue intensity is just equal to 700% minus the relative red and green intensities.

x

9. Recall that the 1931 CIE diagram is wildly nonuniform in its color space map­ping. For example, a unit area of the diagram up near green covers many fewer perceivable colors than a unit area near, say, blue or red. This nonuniformity complicates the evaluation of the best three primaries.

Number by Colors 107

Page 22: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Of Color Diagram

Figure 5.20. The RGB triangle shows the range of colors (color gamut) that can be produced by a typical video monitor. The irregular boundary shows the color gamut produced by a typical process color printing press. The latter boundary is not simple because color printing is a

108

combination of additive and sub- ::.... tractive color mixing. The differ-ence between additive and subtractive color is discussed in detail in Chapter 6. Video and color printing technologies are discussed in Chapter 8.

0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80

X

The implication of this observation is the following: a description of a color in terms of mixtures of red, green, and blue works only when you stay within the same system (by using the same pigments, the same computer monitor types, and so on). There is no guarantee that your red, green, and blue values on one system will be of any particular use in another system. This is why an image that looks one way on one computer monitor can look completely dif­ferent on another monitor, and yet even more different when printed.

For example, Figure 5.20 shows the range of colors (often called the color gamut) of various technologies. It is clear from this figure that some colors can be seen on one device (such as your monitor), but are not available on another (such as a printout).

So where does that leave us? It leaves us with a little more work. Every time an image moves from one system to another, the red, green, and blue values must be adjusted or, in some cases, changed to the closest available color.

Number by Colors

Page 23: Number by Colors || Defining Colors—The CIE Color Diagram

More Adventures on the Of

This conversion is often called a gamma correction. 10 It is not a particularly difficult operation mathematically, in that usually all you need to know are the CIE locations of the three primaries of the source and target systems. 11 Note that image formats such as TIFF and HDF support the storage of information needed for this gamma correction in their image files.

So you should remember the following three things from this section: when moving images from one system to another, do not be surprised if the colors change; there do exist simple methods for correcting your image col­ors; the selection of three primary colors is somewhat arbitrary, and everyone uses a different set.

More Adventures on the CIE

We are not done with the CIE. There are yet more interesting stories to be told about this magical diagram.

White Points

We mentioned before that the location of the white point in the CIE diagram is somewhat arbitrary. In fact, the choice that we used in our example is just one of several that have standard definitions, as we have listed in Table 5-1. In

Table 5-1. A selection of white points defined in the ClE standard.

White Point Color Name x y Temperature Comments

A 0.4476 0.4075 2854 K Incandescent Light B 0.3840 0.3516 4874K Direct Sunlight C 0.3101 0.3162 6774 K Indirect Sunlight D5000 0.3457 0.3586 5000K Bright Incandescent Light D6500 0.3127 0.3297 6504 K "Natural" daylight E 0.3333 0.3333 5500 K Normalized Reference

10. We talk much more about gamma correction in Chapter 7, where the context is the adjustment of intensity values to account for the imperfections of output technologies such as video or printing.

11. At least it is simple for additive colors such as TV or computer monitors. It becomes somewhat more complex with subtractive systems such as printing, where things are not necessarily linear.

Number by Colors 109

Page 24: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Of Color Diagram

Figure 5.21. In this figure we calculate the color of I ight generated by black bodies of various temperatures, and show the ClE locations of those lights. The corresponding color temperatures, along with the locations of the ClE defined

110

white points, are shown on this :::... curve.

0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 X

the table, the (arbitrary) names of these white points are listed in the first col­umn. The CIE locations of the white points are listed in the second and third columns. Perhaps the most interesting column in the table is the fourth one, where the color temperature of the white points is listed (recall our discussion of color temperature in Chapter 4, page 76, "Color Temperature").

The easiest way to explain why this column is interesting is to show where the light from black bodies at various temperatures maps onto the CIE dia­gram. In Figure 5.21 we show this curve, along with the locations of the white points shown in Table 5.1. Note that all the defined white points fall along this black body curve. There is no technical reason why this has to be so. It is just a CIE convention.

Note how the color temperature curve for black bodies starts in the red re­gion, goes though what we would think of as the white region, and then fi­nally ends up over in the near blue, following the red hot, white hot, blue hot sequence that we discussed in Chapter 4.

Technically speaking, only light sources that are on this curve can be thought of as having a color temperature. Most incandescent light sources are, in fact, on this curve. However, fluorescent lights that we perceive as white

Number by Colors

Page 25: Number by Colors || Defining Colors—The CIE Color Diagram

More Adventures on the Of

Figure 5.22. The Protan lines of con­fusion on the ClE 1931 diagram. A protanope (missing red) will recog­nize all the hues along each of these curves as exactly the same color. These curves had to be derived experimentally, because the ClE dia­gram was constructed with imaginary, as opposed to real, cone response curves.

0.90

0.80

0.70

0.50

0.40

::.-. 0.30

0.20

0.10

o

-0.1

0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 1.10 1.2

X

are often a considerable distance away from the black body curve. By conven­tion, these light sources are given a color temperature from the part of the black body curve to which they come closest.

Colorblindness

Recall that in Chapter 3, page 57, "Colorblindness," we discussed colorblind­ness, where an individual may be missing a red (protanope) or green (deuteran­ope) cone system (missing a blue cone system is extremely rare). Recall also that these individuals are not truly colorblind, but just have reduced color dis­crimination.

We can now use the CIE diagram to map their lines of confusion; the col­ors that these lines map out are indistinguishable to these people. In Figure 5.22, we show the lines of confusion for protanopes; in Figure 5.23 we show the lines of confusion for deuteranopes.

Number by Colors 111

Page 26: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The Clf Color Diagram

0.90

Figure 5.23. The Deutan lines of confusion on the (IE 1931 diagram. Again, deuteran­opes (missing

112

green) will confuse all the colors along any particular line of confusion.

0.30

0.10

o

·0.1

0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 1.10 1.20 X

What About Intensity?

Now the CIE is a two-dimensional diagram that allows us to describe hue and saturation. So far we have been ignoring intensity (or lightness12). We have implicitly been assuming that intensity is just a third parameter that has no ef­fect on the other two (hue and saturation).

We know that this is not strictly true. For example, the CIE makes no dis­tinction between white and gray, two sensations that most people would think of as different colors. Perhaps a more egregious example is the lack of distinc­tion between yellow and brown. In both cases, a change in apparent reflectiv­ity (See Chapter 4, page 75) changes our perception of the color. However,

12. Lightness, the term used in the CIE world, can usually be thought of as a syn­onym for reflectivity.

Number by Colors

Page 27: Number by Colors || Defining Colors—The CIE Color Diagram

More Adventures on the Of

dealing with a 20 graph is so much easier than dealing with a 3D color solid, that for the most part people make note of these difficulties but then soldier on with CIE.

There is one feature of the third dimension that we cannot ignore, howev­er: that is the reduction in the allowable color space as the intensity increases. We can understand this effect in a couple of ways. The first way is to think of a piece of white paper with 100% reflectivity. Now imagine adding color to that white paper. There is no way to do so without decreasing its perceived reflectivity from 100%. In fact, the more intense the color, the more its re­flectivity decreases. 13

The other way to understand this effect is to return to the color cube, Figure 5.1. As we described there, the CIE diagram can be thought of as a horizontal slice though a 45% rotated color cube, through the center. If we sliced it higher, which corresponds to higher intensity values, then the area of the color cube on the slice decreases (see Figure 5.4).

In Figure 5.24, we show the decrease in allowable region as the intensity increases, for sunlight only. For other light sources, the concept is the same, but the shapes will be different.

What the CIE Cannot Do

What the CIE organization tried to do with the CIE diagram is to find a graph that can display unique locations for unique color perceptions. For the most part, the diagram does very well at that task. It gives us a mathematical procedure to map an arbitrary spectrum to a location that can give us a color's hue and saturation. The diagram is also good at showing us how we can mix colors to get new color sensations, at least for additive colors (see the next chapter for how the CIE works for subtractive colors).

One thing that the CIE diagram cannot do, however, is to help you figure out the colors that are reflected from an object being illuminated by light of

13. You may see us using the terms intensity and r~f1e(tivity interchangeably here. As we discussed in Chapter 4, our perceptions tend to revolve around reflectivity, even though what we perceive is intensity. For example, if the lights in our room

, double in brightness (intensity), we would rarely notice. However, we do notice very fine changes in the reflectivity of objects in that room.

Number by Colors 113

Page 28: Number by Colors || Defining Colors—The CIE Color Diagram

Chapter 5: Defining Colors-The ClE Color Diagram

0.90

0.80.

Figure 5.24. The ClE diagram, showing the decrease in allowable color space as the intensity of the light source (here sunlight) increases. The numbers associated with each curve are intensity values, in arbitrary units.

0.60 :

0.50 ~"

114

0.20

0.10

o o 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80

X

a particular spectrum. This is the sort of calculation that we went though in Chapter 3: from a light source spectrum to a reflectivity curve to a reflected object spectrum.

It might not be obvious that this does not work. After all, we can locate the incident light source on the CIE, and we can also locate the reflectivity of the object on the CIE.14 From these two locations, can we not derive what CIE location we would get if we shined that light source on that object?

No! We cannot! Those two locations tell us nothing about what the CIE lo­cation of the reflected spectrum would be. It most definitely does not have to be anywhere along a straight line between the two CIE locations, as shown in Figure 5.17.

Why not? Because the CIE only shows us two numbers to describe a color. Reflectivity calculations require the use of the entire spectrum, which con-

14. To place an object's reflectivity on the erE, we just assume that it is being illu­minated by a light source with an absolutely flat spectrum, and then from the resulting spectrum, follow the same procedure as for any other light source.

Number by Colors

Page 29: Number by Colors || Defining Colors—The CIE Color Diagram

More Adventures on the Of

tains much more information than just two numbers. Recall that in Chapter 4, we showed how the perceived color of an object can change when different, but white, lights illuminate it. The CIE cannot help with these calculations; it can be helpful, however, in showing the results of those calculations.

Reproducing the CIE

In Figure 5.20 we showed how color monitor and color printing technologies can only display a limited range of colors. In fact, we showed that no combi­nation of three colors can ever display all colors. So how on earth do people generate accurate CIE diagrams? The short answer is that they don't.

For examples, the color version of the CIE in the book insert was produced using just three primary colors, so we are limited to the color gamut shown in Figure 5.20.We could perhaps increase the color gamut by using four, five, or even more colors. But again, given the shape of the CIE, there will still be regions that cannot be reached with a fixed number of primary colors.

Unfortunately, the only way to make a completely accurate CIE diagram is to paint it, with a mixture of pigments, by hand. This is not exactly conducive to mass production. I have never seen an accurate CIE diagram; few people have.

So how can we compare and contrast colors absolutely accurately? Well, we could always just compare the CIE coordinates of two colors. But somehow, that is not very satisfying. We want to be able to do the comparison visually.

For visual matches, people usually do not use the CIE. Instead, they use a handy little book of colors put out by a variety of companies, the best known of which is Pantone. 15 This book contains swatches of hundreds of colors. Each color swatch is generated by a unique pigment; in other words, it is not produced by traditional three- or four-color printing. It would be like taking an accurate CIE diagram, and cutting it up into little swatches.

Because every one of those hundreds of swatches requires a unique paint, this book is not cheap to produce. But it is readily available. The use of these color swatch books such as Pantone has become so widespread that many col-

15. There are several other color reference systems: the Munsell system and the Tek­tronix system come to mind.

Number by Colors 115

Page 30: Number by Colors || Defining Colors—The CIE Color Diagram

116

Chapter 5: Defining Colors-The Clf Color Diagram

or professionals (printers, graphic artists) use them exclusively to specify col­ors. They will rarely refer to CIE coordinates.

But Pantone colors do not eliminate the need for the CIE. The Pantone book does not, for example, show you how different colors mix, or how to calculate the hue and saturation of a color. For that, we go to our friend, the CIE.

Summary

The 1931 CIE color diagram is the currently the most widely used worldwide standard for the description of colors. Although at first glance the CIE dia­gram is strange and nonintuitive, we can (and do) show how the CIE was de­rived somewhat logically from the earlier concepts of color triangles and color cubes, and from what was known in 1931 about color vision.

One limitation of the CIE diagram that should be serious is the fact that it is two-dimensional. After all, describing colors is an inherently three-dimen­sional operation, the dimensions corresponding to the three kinds of color sensors in our eyes. But it turns out that two dimensions are enough; our brain somehow separates the information about light intensity from the informa­tion about color hue and saturation. The CIE diagram removes all intensity information, and uses its two dimensions to describe hue and saturation.

One reason that we spend so much time on the CIE is that it is a very con­venient mechanism for doing calculations on additive color mixtures. For ex­ample, the CIE location of a combination of two lights must be on a straight line between the CIE locations of those two lights.

Responses to Questions for the CIE Color Diagram

1) What is the CIE color diagram, and why do I care?

The CIE color diagram is used to describe color sensations. You should care because it is a worldwide standard for describing colors and color gamuts, and for doing calCIIlations of color sensations.

2) It is often said that three properly chosen primary colors can be used to generate all other colors. This statement is false. Why?

Number by Colors

Page 31: Number by Colors || Defining Colors—The CIE Color Diagram

Summary

No three colors can cover the mtire observable color gamut dljilled by the CIE. A properly chosm set of three colors can span most, but not all, qf color space. See page 108, "Primary Colors on the CIE. "

3) No known output device such as a printing press or a laser printer can generate an accurate image of the CIE diagram. Why?

Again, it is because all color output devices use a fixed number of pig­ments to generate their colors, usually three or four. No fixed number qf pigments can generate all observable colors.

4) Why do color printouts of an image often look different than the same image on a computer screen? Is it just flaky software, flaky hardware, or something more fundamental?

The hue generated from three primary colors depends critically on the spec­tra qf those primary colors. Every output device uses a dijferent set. This means that if the same three numbers for the intensity qf the primary col­ors are used in, say, a color monitor and a printer, one may get very dijfer­ent resulting hues. Correcting for the dijfering technologies is called color correction. Note that even if the color values are corrected peifectly, there still may be problems, because the color gamut qf the two technologies may be very dijferent.

References

Hubel, David H. 1988. Eye, Brain, and Vision. New York: Scien­tific American Library, W H. Freeman.

Hunt, David M. et. al. 1995. Science 267, 984 (Feb 17).

Murch, Gerald M. 1988. Human Factors qf Color Displays. Bea­verton, Oregon: Tektronix.

Rossotti, Hazel 1983. Colour: Why the World Isn't Grey. Prince­ton, New Jersey: Princeton University Press.

Number by Colors 117