Search This Blog

Wednesday, 23 October 2013

color in computing

With the exception of a few experimental systems, color graphics first became widely available only with the begin-nings of desktop computers in the late 1970s. The first microcomputers were able to display only a few colors (some, indeed, displayed only monochrome or grayscale). Today’s PC video hardware has the potential to display millions of colors, though of course the human eye cannot directly distinguish colors that are too close together. There are several important schemes that are used to define a “color space”—that is, a range of values that can be associ-ated with physical colors.


RGB

One of the simplest color systems displays colors as varying intensities of red, green, and blue. This corresponds to the electronics of a standard color computer monitor, which uses three electron guns that bombard red, green, and blue phosphors on the screen. A typical RGB color scheme uses 8 bits to store each of the red, green, and blue components for each pixel, for a total of 24 bits (16,777,216 colors). The 32-bit color system provides the same number of colors but includes 8 bits for alpha, or the level of transparency. The number of bits per pixel is also called the bit depth or color depth.

CMYK

CMYK stands for cyan, magenta, yellow, and black. This four component color system is standard for most types of color printing, since black is an ink color in printing but is simply the absence of color in video. One of the more diffi-cult tasks to be performed by desktop publishing software is to properly match a given RGB screen color to the cor-responding CMYK print color. Recent versions of Microsoft Windows and the Macintosh operating system include a CMS (color matching system) to support color matching.

Palettes

Although most color schemes now support thousands or millions of colors, it would be wasteful and inefficient to use three or four bytes to store the color of each pixel in memory. After all, any given application is likely to need only a few dozen colors. The solution is to set up a palette, which is a table of (usually 256) color values currently in use by the program. (A palette is also sometimes called a CLUT, or color lookup table.) The color of each pixel can then be stored as an index to the corresponding value in the palette.

No comments:

Post a Comment