![](http://images-20200215.ebookreading.net/23/1/1/9781482247336/9781482247336__a-computational-introduction__9781482247336__bg189.png)
Color Processing 375
13.2 Color Models
A color model is a method for specifying colors in some standard way. It generally
consists of a three-dimensional coordinate system and a subspace of that system in which
each color is represented by a single point. We shall investigate three systems.
RGB
In this model, each color is represented as three values R, G, and B, indicating the
amounts of red, green, and blue which make up the color. This model is used for displays
on computer screens; a monitor has three independent electron “guns” for the red, green,
and blue component of each color. We have met this model in Chapter 2.
Note also from Figure 13.1 that some colors require negative values of R, G or B. These
colors are not realizable on a computer monitor or TV set, on which only positive values
are possible. The colors corresponding to positive values form the RGB gamut; in general
a color “gamut” consists of all the colors realizable with a particular color model. We can
plot the RGB gamut on a chromaticity diagram, using the
xy coordinates obtained above.
To define the gamut, we shall create a 100 × 100 × 3 array, and to each point (i, j) in the
array, associate an XYZ triple defined by (i/100, j/100, 1 − i/100 − j/100). We can then
compute the corresponding RGB triple, and if any of the RGB values are negative, make
the output value white. Programs to display the gamut, which is shown in Figure 13.4, are
given at the end of the chapter
FIGURE 13.4: SEE COLOR INSERT The RGB gamut
HSV
HSV stands for hue, saturation, and value. These terms have the following meanings:
Hue: The “true color” attribute (red, green, blue, orange, yellow, and so on).
Saturation: The amount by which the color has been diluted with white. The more white
in the color, the lower the saturation. So a deep red has high saturation, and a light
red (a pinkish color) has low saturation.