Digital Images Part 2: Color

So. Life isn't in black and white, so logically, so should our pictures be? (no offense to B&W photography)

There's so much to say about color as a broad topic and the ways in which we perceive it, but in the interest of the whole "teach you something cool in like... a minute or two," I'm going to simply demonstrate how the RGB (Red, Green, Blue) color-space works. 

So, that word: color-space. That basically refers to the interplay between multiple matrices (or grayscale images) that are "stacked" (not the technical term for it but it illustrates the idea nicely) atop each other to represent various colors. The RGB color-space is the most ubiquitous for digital images, and once the three grayscale images corresponding to the following matrices are stacked atop one another, they are tinted (red, green, and blue) to create many of the wonderful colors we know and love!

RGB

Which gives us this:

RGB plate

And violá. COLORS! Red, Green, Blue, Yellow, Magenta, and Cyan (which some of you may recognize from your printer ink cartridges, with K being black). Learn about CMYK here. Notice that when the values corresponding to a pixel in all three color channels are the same, we get our familiar black, white, and gray!

Since I the matrices I introduced last time have 256 possible values for each entry (0 to 255), we have millions (16,777,216) of possible colors! Less possible values for each pixel means less information for a computer to store and consequently less colors (more on this here), which explains why your old video games all kind of look unrealistic (less memory). If you're interested, here's more on the RGB color-space.
 

I hope you've enjoyed this post. Next time: another color-space. The one your old TVs used to use!