We'll start with some underlying terms and ideas before we begin exploring graphics software. Every graphic will be considered a rectangular array of colored (perhaps with shades of gray only) points. This array can be displayed on a screen or printed.
Computer graphics can be classified a number of ways. The first characteristic is how numbers are associated with colors. We'll look at other fundamental characteristics later. Here, we'll just examine numbering systems. If everything in a computer is coded as numbers, how do we deal with color?
Indexed vs RGB color systems vs CMYK systems
Indexed systems associate one number with each color in the palatte of all colors that are available. Paint stores use indexed systems. A clerk in one store can call another and ask if they have color number 753. This is an example of coding colors by numbers in an indexed system. They can have millions of choices in the system. If you numbered every crayon of a box of crayons, you would be creating an index system. One example of an indexed coloring system that is commonly used on the world wide web is called GIF (Graphics Interchange Format). GIF format uses an index system that is limited to at most 8 bits per color. This means there are no more than 256 colors in a GIF palatte. Click here to go to a page with more information about GIF format. Other computer indexed systems (like Pantone) uses thousands of colors.
RGB systems use another method to associate numbers with colors. In an RGB system, there are 3 numbers associated with each color. One number represents the Red amount, another the Green, and a third the Blue. (So red, green, and blue are called primry colors.). The actual color that these form is a mix of these three primary colors. The numbers represent the saturation level of each of the primaries. The total number of possible colors that can be formed is the product of the number of red levels, the number of green levels, and the number of blue levels. One example of an RGB system is JPEG. Click here for details about JPEG. There are many other RGB systems in use besides JPEG, however. Some variations include Adobe RGB and a system called sRGB. Much color work uses a 24 bit system with 8 bits to encode the red number, 8 bits to encode the green number and 8 bits to encode the blue number. But there are also systems that use 14 bits for each of these or 16 bits for each. The more bits you use, the more different colors you can encode. But the numbers get huge. A 16 bit system can encode 2^24 = 16,777,216 colors. And a 48 bit system (Photsohop can do this) with 16 bits for each of Red, Green, and Blue, can code 2^48 = 281,474,976,710,656 colors! (That's over 281 trillion colors.)
There are other systems for associating numbers with colors. One popular one for print materials is CMYK. It is frequently used in desk-top publishing. It is not commonly used for screen graphics. Screen graphics are invariably Indexed or RGB. CMYK uses 4 numbers for coding the amount of Cyan, Magenta, Yellow, and Black needed to form a color. You can use 8 bits for cyan, 8 for magenta, 8 for yellow, and 8 for black or more bits for each.
The main thing you need to know is that these are all different systems for associating numbers with colors. This stands at the heart of coding the colors we see and want to show into something the computer can deal with. Remember, we started the course with the idea that our digital age is driven by the idea of encoding everything as numbers. We now see three fundamentally different ways of doing this. One (indexed) uses a single number for each color. RGB uses 3 numbers for each color. CMYK uses 4 numbers for each color.
Origins of some of these different systems -- A Touch of color theory - CMYK vs RGB
So why are there several different color coding systems? Having some systems that just index colors and others that represent mixing primaries makes sense, but why different ways to mix primaries? In particular, why do we use both RGB and CMYK? This has to do with the origins of these systems and a little physics. The main factor, which we don't often think about, is that sometimes we look at something like a printed page or object in which case the light we see is reflected off the object to our eyes and sometimes we look at color, like on a screen, where the color is beding emitted or sent straight to our eyes rather than bouncing or reflecting. Light that reflects off a surface is having colors subtracted from it.
White light from the sun or a bulb is a full mix of red, green, and blue.
In general, CMYK is used for color coding graphics that are viewed with reflected light. For example, you view a printout with reflected light. (The light goes from, say, a bulb to the paper and reflects back to your eyes. The dyes that we think of as forming the colors actually subtract (do not reflect) certain frequencies of light and reflect others. Thus they are called subtractive systems. C is for Cyan; M is for Magenta, and Y is for Yellow. K -- I'll get to that one.
Cyan absorbs red only. It thus reflects green and blue. When these mix, they form the color we call Cyan. Magenta absorbs green and, you guessed it - Yellow absorbs blue. Thus CMYK is still all about Red, Green and Blue. But what's the K? In theory, to print a black paper, which should absorb all red, green, and blue, you should be able to mix full cyan, full magenta, and full yellow dyes on the paper. But if you do, it looks muddy gray, not black. But humans are very perceptive of the finer shades of black. Witness our ability to distinguish different "blacks" in clothes. So in printing, we usually include a cartridge with deep india black ink. This is what the K means. We mix cyan, magenta, yellow, and black to form rich printed colors. There -- and in our work we'll pretty much always use RGB. In the illustration below, white light (red, green, and blue light) hits paper with cyan dye in the upper left, magenta upper center, yellow upper center. So in the upper left, the red arrow goes down, but doesn't bounce up like the green and the blue. So whehn we look at the paper we don't have the red coming into our eye. Only the green and blue. So we see cyan. See if you can sort out the others in the first row. In the second row, each example has two dyes (magenta and yellow on the left, etc.) See if you understand what that row tells you. In each, two colors are not reflected so we jsut see a primary. Ask in Blackboard if you are confused. This diagram comes from a good site about this (RGB World).
The RGB system, on the other hand, is used with things like screens that start black and emit light in various mixes. This is called an addative system. We add part red, part green, and part blue to form any color. White is a full blast of all three. Black is formed by emitting none of them at all. So our coloor numbering sytems tell what to mix by the numbers.
Note that these systems are for associating numbers with colors. When applied to a bit-mapped graphic, each pixel then, with a color, has one or more numbers associated with it specifying the color.