## 2. Color models

Before we discuss the operation of huey, a brief review of color space theory is in order.

The author has relied heavily on one book as a comprehensive reference on color theory as it relates to computer graphics.

Foley, James D., Andries van Dam, Steven K. Feiner, and John F. Hughes. Computer graphics: principles and practice. Second edition. Addison-Wesley, 1992. ISBN 0-201-12110-7.

There are several different ways to represent a color as a set of three numbers called parameters. This program supports three of them. In each model, each parameter varies from 0 to 255.

### 2.1. The HSV model: hue, saturation, and value

In the HSV model, the three parameters used to describe a color are called hue, saturation, and `value`.

• The hue parameter describes the general kind of color. As the hue parameter ranges from 0 to 255, the color starts around the color wheel, displaying first red, then yellow, green, cyan, blue, magenta, and finally back to red.

• The saturation parameter describes how strong the color is. A color with full saturation (a value of 255 in this program) has full color. As the saturation decreases to zero, there is less and less color tint.

• The value parameter describes how light or dark the color is. A value parameter of zero will always be black, regardless of the other parameters. Increasing the value to 255 lightens the shade.

A color with full saturation and value is called a primary color. For example, if the hue is 0 and the saturation and value are at 255, the color is bright, primary red.

### 2.2. The RGB model: red, green, and blue

The three parameters of a color in the RGB model describe the relative amounts of red, green and blue.

The RGB model is sometimes called the additive color model. If all three parameters are zero, the color is black. Increasing a parameter adds more and more pure color. For example, if the R and B parameters are zero, and the G parameter is 255 (the maximum), you will see pure green. White has all three parameters at 255.

Computer display panels use the RGB model. Additive color mixing is also used in stage lighting. For example, to light a scene in yellow, mix red and green.

### 2.3. The CMY model: cyan, magenta, and yellow

The CMY color model is also called the subtractive model. In this model, white has all three parameters at zero. Increasing the amount of cyan is the same as subtracting red; increasing magenta is the same as decreasing green; and increasing yellow is the same as decreasing blue. Black has all three parameters at their maximum.

Color darkroom work uses the CMY model. To correct the color of a film original, the enlarger's color head can produce light with a wide range of colors. The color head starts with pure white light. Knobs on the color head use cyan, magenta, and yellow filters to subtract red, green, and blue respectively.