Color Theory in Practice
main image
 
Most of us take it for granted that color is available to us when we edit, paint and draw, but did you ever wonder where screen and file colors come from? The smart-aleck answer is, “Why, from the color palette!” but the nature of digital color is somewhat of a mystery I’m going to demystify in this article. If you don’t understand how your favorite app derives colors, you have little control over color accuracy and consistency as you post your work and print it, and you’ll be in for a nasty surprise when you share the artwork you slaved over.

In computer graphics, we enjoy the breadth of 16.7 million unique colors with which to fill and stroke. This is commonly called 24-bit color, usually organized in 8-bit color component channels of red, green, and blue. Digging down, each color channel has a brightness capability of 2 (a binary value) to the 8th power, equaling 256 values, going from 0 to 255.
RGB

Unlike physical pigments which are subtractive, digital color is additive: yellow is achieved by specifying full red and green, for example.
AdditiveHSV

Because digital color is not easily defined by mixing red, green, and blue, Alvy Smith (an accomplished artist and original co-founder if Pixar Studios) created a different color model, called HSV (Hue, Saturation and Value, also called Lightness, Brightness, and Luminance...same difference). The HSV color model engenders the same colors as the RGB color model and all apps I know of can switch views of color models on the fly. Color models are assigned to color modes.


A color mode defines the color space within which you work. This might get a tad confusing; color modes, models and spaces are not the same thing, but rather they are inter-dependant. Color modes are usually offered in bitmap editors such as Photoshop, but not vector drawing apps such as Xara, due to the fundamental difference between pixels and vectors.

additive-subtractive

Color modes include RGB, grayscale, CMYK (for printing), Indexed, and 1 bit/pixel, often called Bitmap mode (frequently used in faxing and a really lousy mode for creating bitmap artwork). Indexed color mode is sort of interesting—it dates back to early color computer graphics and Compuserve’s GIF file format. In contrast to RGB color mode, Indexed color images use color “tags”, also called a lookup table instead of color component channels.

1 bit per pixel

There are up to 256 color tags in the header of an Indexed color image; when you open such an image, the application reads the header index and then assigns each pixel the appropriate color. This Indexed structure allows a file to be opened very quickly online, hence its popularity, but an Indexed image looks pathetic when compared to its RGB original because you’re going from 16.7 million colors to 256.

indexed color

Color space defines both the range and color capability of a design. Commonly, we use the RGB color space because to date, it most faithfully represents the gamut (range) of colors the human eye can perceive onscreen and to a lesser extent in the real world. When we see an image onscreen we think is photorealistic, the RGB color space is doing its job, accurately mimicking real world colors onscreen. However, there’s an uber color space within which RGB color space fits, and it was invented almost 100 years ago. The Commission Internationale de l'Eclairage (the CIE, the International Commission on Illumination) was established as a worldwide organ for standardizing and exchanging color specs. They are responsible for creating the LAB color model, one that successfully replicates the spectrum of human vision. It’s modeled after one channel of Luminance, one color channel that runs from magenta to green, and another channel from yellow to blue.

LAB color model



LAB color is an important exchange space, because it’s device-independent. In English, suppose you’re a soft drink company and you want your product colors to be identical when printed on metal, on plastic, on cardboard displays and on images on your website. Different pigments react differently on different media, and by using LAB color specifications, you’re assured color consistency. Xara users don’t have LAB to play with because colors assigned to vectors aren’t calculated this way, but when you switch color modes and profiles (I’ll get to this in a minute) in Photoshop, LAB is used as an internal meeting place, so when you go from RGB to CMYK for example, no color space clipping occurs. Figure 1 shows a 3D representation of LAB color space.

Different color spaces overlap, and although they mostly coincide, certain areas go out of each others’ boundaries. LAB is larger than RGB, RGB is larger than sRGB, and sRGB is larger than CMYK, as you can see in figure 2. sRGB is a relatively new color space—it’s optimized for a lot of digital cameras and scanners to produce very juicy but inaccurate colors. Because sRGB is smaller than RGB, you clip colors, losing original image information, when you save to this color space.

So what happens to colors when you save a document? Because colors in a design can change dynamically when you edit, colors are calculated for display using your PC processor’s floating-point unit. When you write (save) an image, the colors become fixed values—this is called color quantization. Although a file format doesn’t hold explicit color space information, certain formats can hold a color profile that tells applications how to open a file to display and print colors correctly. Chances are you have Adobe RGB color profile on your system; this is decidedly the best profile with which to tag your images. Check your Windows\system32\spool\drivers\color folder sometime. You’ll see the installed color management files. They go by different extensions, but what they all do is tag your image files with a profile that enables applications to display your work as you intended it. File formats that can handle color profiling include TIF, SuperPNG, JPG, PSD and a few proprietary formats. So you see, ultimately, it’s the file format that saves color spaces.

color spaces

To conclude, there has been a movement lately to 48-bit color (16 bits/pixel for each color channel), particularly with digital cameras and the DNG file format. Only in certain ways does 48-bit color affect the color management I’ve described in this article. Instead of 16.7 million possible colors, you now have 4.2 billion colors available, clearly you have more colors to work with, but all these colors can be handled by the LAB model descriptor because it handles space and not the number of colors—think of a space as being under and overpopulated. The only real problem that exists with 48-bit color capability at present is seeing it—your monitor and video subsystem are 24-bit. But working with what you literally can’t see is a temporary inconvenience. Most assuredly your system will evolve to 48-bit capability through future upgrades and at present 48-bit images usually display like 24-bit, but if you send a copy to a print house that offers 48-bit services, the print will look noticeably more lifelike.

Copyright © 2008, This e-mail address is being protected from spambots. You need JavaScript enabled to view it . This article may not be reproduced using mechanical or electronic methods except for personal use, without the consent of the authors.