Colors on computer monitors are commonly based on what is called the RGB color model. Colors in this system are created by adding together percentages of the primary colors red $(\mathrm{R})$, green $(\mathrm{G})$, and blue (B). One way to do this is to identify the primary colors with the vectors

$$

\begin{array}{ll}

\mathbf{r}=(1,0,0) & \text { (pure red) } \\

\mathbf{g}=(0,1,0) & \text { (pure green) } \\

\mathbf{b}=(0,0,1) & \text { (pure blue) }

\end{array}

$$

in $R^{3}$ and to create all other colors by forming linear combinations of $\mathbf{r}, \mathbf{g}$, and $\mathbf{b}$ using coefficients between 0 and 1 , inclusive; these coefficients represent the percentage of each pure color in the mix.

The set of all such color vectors is called RGB space or the RGB color cube (Figure 3.1.14). Thus, each color vector c in this cube is expressible as a linear combination of the form

$$

\begin{aligned}

\mathbf{c} &=k_{1} \mathbf{r}+k_{2} \mathbf{g}+k_{3} \mathbf{b} \\

&=k_{1}(1,0,0)+k_{2}(0,1,0)+k_{3}(0,0,1) \\

&=\left(k_{1}, k_{2}, k_{3}\right)

\end{aligned}

$$

where $0 \leq k_{i} \leq 1 .$ As indicated in the figure, the corners of the cube represent the pure primary colors together with the colors black, white, magenta, cyan, and yellow. The vectors along the diagonal running from black to white correspond to shades of gray.