# The Kaleidoscopic Mathematics of Colors

What is amazing about mathematics is that it can be used to represent or approximate reality. Shapes can be represented by graphs, patterns by equations, and events by mathematical models. In this post, we discuss another type of representation — the mathematics of colors.

Although movies and animations, nowadays, show vibrant and life-like colors, all of the colors we see are just combinations of three primary colors: red, green, and blue. The technology used in many of these movies (both software and hardware) use the red-green-blue or the RGB color model.

The RGB color model combines three color light beams – red (R), green (G), blue (B) – on a black background to produce other colors. The intensity of each color can extend from *fully off* (0) to *fully on* (255). So, the triple (0, 255, 127), means a fully-off red, a fully-on green, and a half-on blue (see figure below). As we can see, since green is fully-on, the color is greenish.

You have probably noticed color palettes (or sliders) such as the one shown above pop-up in several computer applications you use. Some of these palettes use the decimal numbers (0-255) to gauge the intensity of the colors, while others use hexadecimal number equivalents (00-FF). In this post, however, we use the more familiar decimal numbers.

Zero intensity of all colors (0,0,0) implies that no light beam is on and therefore will produce black. Full intensity of all the colors (255, 255, 255) means all light beams are fully on and therefore will produce white. In addition, since there are 256 colors that we can choose from each primary color, the three primary colors can produce up to colors. Now that’s a lot of colors to choose from!

The RGB color model is only one of the many color models used by modern technology. There are other color models such as the CMYK color model where colors cyan, magenta, and yellow are mixed on (or subtracted from) a white background.