Previous Table of Contents Next


Chapter 13
Color Models

What This Chapter is About

Color models facilitate color specification in a standard, non-subjective, repeatable manner. This chapter discusses various ways to represent the spectral colors and their various tone, tint, and shade mixtures. Because of human trichromatic vision, these models all involve three variables and involve three-dimensional considerations. Monitors primarily use the RGB model, printers the CMY and CMYK models, and televisions use the YCbCr model. The HSV and HLS models are computationally faster than the HSI model, but none of the three models are perceptually uniform models where uniform distance changes within the model cause uniform visual changes. So their utility is diminished as compared to uniform perception models whose mathematics exceed this book’s scope.

The VESAPCX.C program illustrates how to convert back and forth between four of these color spaces (RGB, HSV, HLS, and HSI) and the VESATEST.C program in Chapter 16 displays three of the spaces (RGB, HSV, and HSI).

RGB Model

CRTs typically add emitted red, green, and blue phosphors light, hence this model’s name RGB. Suppose you have a 700.0 nm red spectral illumination source (light), 546.1 nm green spectral illumination source, and 435.8 nm blue spectral illumination source, though the discussion applies to other spectral wavelength selections and spectral power distributions that observe a special form of linear mathematics. However, expecting two monitors to have these or any other consistent RGB primary combination is naive.

When a light is completely off, its radiance value is 0.0. By illuminating a white surface that reflects all light equally and adjusting each light’s radiance independently, we can produce achromatic light that seems to be “white” and has the maximum luminosity the light sources allow. In this state, we assign a value of 1.0 to each light’s radiance value. Earlier material discussed various black body illuminants and how the human perception system is not too picky about what it considers white. Finally, we assume any light’s radiance value can vary continuously and between 0.0 and 1.0 independent of the other two. This is the RGB color model’s foundation.

The RGB model represents all possible additive primary color combinations that a specific monitor can produce using a cube. But different monitors can have different cubes. Remembering high school geometry, a cube is a three-dimensional solid enclosed by six equal-size squares that are perpendicular or parallel to one another. Using three intersecting cube edges as axes and defining their intersection as an origin allows us to identify each point within the cube using Cartesian coordinates as in Figure 13-1. In the figure, one edge is an axis for the red values, the other two are for green and blue, respectively, and the origin is the point common to the red, green, and blue axes.


Figure 13-1  The RGB model

Since any point within the cube has unique coordinates, it identifies the unique radiance value for each of the three primary lights that produce the specific visual blend corresponding to the point. So you might envision the RGB model as a cube filled with continuously varying primary color mixtures. In practice, color palettes and the programs in this book specify RGB component radiance values as digital values, ranging from zero to 255, rather than continuous values, ranging from 0.0 to 1.0. Therefore, RGB model discussions assume you have normalized the allowed radiance value set by dividing each allowed value by the maximum value. So, the value set { 0, 1,..., 255} becomes {0/255, 1/255,..., 255/255}. Also, varying the maximum settings slightly varies the white definition—analogous to selecting a different illuminant. This corresponds to aligning display controller DAC color ramps (loading with slightly different values) to achieve warmer or cooler whites.

Looking at Figure 13-1 which assigns the first coordinate to red, the second to green, and the third to red for (R, G, B) ordering, note the following coordinate points:

(0.0, 0.0, 0.0) represents black

(1.0, 1.0, 1.0) represents white

(1.0, 0.0, 0.0) represents maximum radiance, fully saturated red

(0.0, 1.0, 0.0) represents maximum radiance, fully saturated green

(0.0, 0.0, 1.0) represents maximum radiance, fully saturated blue

(0.0, 1.0, 1.0) represents maximum radiance, fully saturated cyan (red’s complement)

(1.0, 0.0, 1.0) represents maximum radiance, fully saturated magenta (green’s complement)

(1.0, 1.0, 0.0) represents maximum radiance, fully saturated yellow (blue’s complement)

First, note that the printing, film, and video industries often provide footroom and headroom provisions for the black and white points, respectively. This means that, say, (0.05, 0.05, 0.05) is arbitrarily considered black, while (0.95, 0.95, 0.95) is arbitrarily considered white. This allows color ramp fine-tuning adjustments. Second, looking carefully at Figure 13-1, it follows that:

Any point on the line segment connecting the black and white point represents an achromatic mixture with some unique radiant value.

Any point on a coordinate axis provides a unique radiant value for the corresponding spectral color since, by definition, the other two lights have a 0.0 radiance value (are off).

Any cube surface having two axes for edges (i.e., the RG, RB, and GB sides) contains only saturated colors.

Any point inside the cube or not on a saturated surface is unsaturated to some degree since R, G, and B radiance values are greater than zero, generating some achromatic light which blends in with the remaining saturated color.

Now consider any point not outside the cube (inside or on a cube surface) and draw a straight line through it and the black point (0.0, 0.0, 0.0). From geometry, it follows that all points lying on the line have proportional coordinates. As an example, (0.10, 0.20, 0.30) and (0.20, 0.40, 0.60) have proportional coordinates because they lie on the line connecting (0.10, 0.20, 0.30) and (0.0, 0.0, 0.0). In the RGB model, all points lying on such a line represent analogous proportional primary light radiance selections which produce different radiances for the same relative blend. So, the (0.20, 0.40, 0.60) setting is equivalent to using two primary light groups with each group set at (0.10, 0.20, 0.30). But in practice the principle does not hold for individual RGB monitor electron guns. So radiance accuracy, hence color fidelity, can wobble along as the RGB values remain proportional but collectively change.

Finally consider the point (0.10, 0.20, 0.30). This is equivalent to using two primary light groups with one group set at achromatic (0.10, 0.10, 0.10) and the other set at a fully saturated (0.00, 0.10, 0.20) cyan tint.


Previous Table of Contents Next