In many math classes we work with vectors. I love to use colors to clarify relationship between various mathematical quantities that we encounter. Therefore it is useful to present how colors can be organized using vectors in the unit cube in $\mathbb{R}^3$.
$\displaystyle \begin{bmatrix}0 \\ 0 \\0\end{bmatrix}$ Black | $\displaystyle \begin{bmatrix}1/2 \\ 1/2 \\ 1/2\end{bmatrix}$ Gray | $\displaystyle \begin{bmatrix}1 \\ 1 \\ 1\end{bmatrix}$ White | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$\displaystyle \begin{bmatrix}1 \\ 0 \\0\end{bmatrix}$ Red | $\displaystyle \begin{bmatrix}1/2 \\ 0 \\0\end{bmatrix}$ Maroon | $\displaystyle \begin{bmatrix}1/2 \\ 1/2 \\0\end{bmatrix}$ Olive | $\displaystyle \begin{bmatrix}1 \\ 1/2 \\0\end{bmatrix}$ Orange | $\displaystyle \begin{bmatrix}1 \\ 1 \\0\end{bmatrix}$ Yellow | ||||||||||||||||||
$\displaystyle \begin{bmatrix}0 \\ 1 \\0\end{bmatrix}$ Green |
|
$\displaystyle \begin{bmatrix}1/2 \\ 1 \\0\end{bmatrix}$ Chartreuse | $\displaystyle \begin{bmatrix}0 \\ 1/2 \\ 1/2\end{bmatrix}$ Teal |
|
||||||||||||||||||
$\displaystyle \begin{bmatrix}0 \\ 0 \\1\end{bmatrix}$ Blue | $\displaystyle \begin{bmatrix}0 \\ 0 \\ 1/2\end{bmatrix}$ Navy | $\displaystyle \begin{bmatrix}1/2 \\ 0 \\ 1/2\end{bmatrix}$ Purple | $\displaystyle \begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}$ Magenta | $\displaystyle \begin{bmatrix}0 \\ 1 \\ 1\end{bmatrix}$ Cyan | ||||||||||||||||||
|
|
|
|
|
||||||||||||||||||
|
$\displaystyle \begin{bmatrix} 1 \\ 1/2 \\ 1/2 \end{bmatrix}$ Salmon |
|
|
27 special colors in the Color Cube
Place the cursor over the image to start the animation.
It is important to point out that in the red-green-blue coloring scheme, the following eighteen colors stand out. I present them in six steps with three colors in each step.
Thinking of colors as vectors helps us to understand a transition between two colors.
Place the cursor over the image to start the animation.
Since Teal and Yellow are the heads of particular vectors in the Color Cube, to construct a transition I connected the heads with a line segment. Points on this line segment are the heads of special linear combinations of the vectors representing Teal and Yellow. As an exercise write the linear combinations which are used in the above transition.
Place the cursor over the image to start the animation.
In the above animation I used the colors from the line segment connecting Teal and Yellow to color the rectangles in the middle of the square.
Above is the unit circle colored using colors from the line segment connecting Teal and Yellow.
An application of an orthogonal projection studied in Linear Algebra is converting a color image to a black&white image. To understand this claim, you first need to understand that colors are in fact vectors in $\mathbb{R}^3,$ not all vectors in $\mathbb{R}^3,$ but only vectors confined to the unit cube \[ [0,1]^3 = \left\{ \left[\begin{array}{c} r \\[-4pt] g \\ b \end{array}\right] \, : \, r, g, b \in \mathbb{R} \right\}. \] Here we use so called RGB color model. I like using RGB triplets with entries between $0$ and $1$, including $0$ and $1$.
All shades of gray are obtained by scaling the vector $\left[\begin{array}{c} 1 \\ 1 \\ 1 \end{array}\right]$ with a scalar $\alpha \in [0,1]$. The orthogonal projection onto the vector $\left[\begin{array}{c} 1 \\ 1 \\ 1 \end{array}\right]$ is given by the formula: \[ \left[\begin{array}{c} r \\[-4pt] g \\ b \end{array}\right] \mapsto \frac{1}{3} \left[\begin{array}{c} r+g+b \\[-2pt] r+g+b \\[-1pt] r+g+b \end{array}\right]. \]
In the animation below, the shades of Gray are on the diagonal of the unit cube joining the corners $(0,0,0)$ (Black) and $(1,1,1)$ (White). For the hundred shades of Gray $(a,a,a)$ with $a \in [0,1],$ I present a polygon of all the colors that are projected to that shade of Gray. The shade of Gray can be identified by the dot in the center of the polygon of colors. I present both a three-dimensional picture in the Color Cube and a two-dimensional orthogonal projection onto the plane which is orthogonal to the vector $\left[\begin{array}{c}1 \\ 1 \\ 1 \end{array}\right].$ Hover the cursor over the image for the animation to start.
Here I explore other transformations of colors using Linear Algebra? I took a small image of me, imported the image into Wolfram Mathematica and did three linear algebra operations on the colors in that picture.
The justifications for the definitions in the preceding two items are the pictures below: