Palette (computing) - Related Terms and Technologies

Related Terms and Technologies

See also Indexed color

The terms color palette, indexed color, and related terms have been used with various differences in meaning, as discussed below.

The RGB color model is today the most usual method to produce and encode colors; but colors in palettes may or may not be reproduced through red-green-blue primaries, depending on a given display hardware. To express that a given palette usage is based in the RGB color model, the term RGB palette is commonly employed, within many of the contexts in which the term palette can be used (see the previous section). The RGB color model is usually assumed by default for palettes, if not otherwise noted.

Indexed color is a technique to manage image colors in a limited fashion, in order to save RAM and video memory buffer space, file storage space, telecom bandwidth, and to speed up display refresh and telecom transfers. Instead of storing and managing every primary color component of every pixel, the most representative colors, or the fixed hardware colors, are grouped into a limited size palette: an array of color elements, in which each element (a color) is indexed by its position. This way, the pixels contain not the full color components but merely their index into the palette; this is sometimes referred as pseudocolor.

This technique saves a lot of memory/storage space and/or transmission time: if the full RGB color palette is truecolor, there are 16,777,216 different possible colors, and each pixel needs 24 bits, or 3 bytes. A typical 640×480 VGA resolution, truecolor uncompressed image needs 640×480×3 = 921,600 bytes (900 KiB). Limiting the image colors to 256, every pixel needs only 8 bits, 1 byte, so the example image now needs only 640×480×1 = 307,200 bytes (300 KiB), plus 256×3 = 768 additional bytes to store the palette map (assuming 24-bit RGB), approximately one third of the original size. Smaller palettes (4-bit 16 colors, 2-bit 4 colors) can pack the pixels even more (to 1/6 or 1/12), obviously at cost of color accuracy. While it is acceptable for little images (icons) or very simple graphics, to reproduce real-life images this loss of color availability becomes more of a problem. Some clever tricks, as color quantization, anti-aliasing, and dithering combined together can approximate indexed 256-color images to the original one.

A palette entry is one of the color items in a color palette (in hardware or in a file).

Indexed color has been widely used in early personal computers and display adapters' hardware to reduce costs. Notable computer graphics systems extensively (or even exclusively) using pseudocolor palettes include EGA and VGA (for the IBM PC compatibles), the Atari ST and Amiga's OCS and AGA.

The same way, image file formats used to encapsulate this kind of images, as PCX and GIF, which along with a header and the raw image data store the palette color maps as well, arose in the same period (circa the 1980s). Some of the more modern image file formats as BMP, TIFF and PNG also allow indexed color modes, generally up to 16 or 256 (four or eight bits per pixel). All these file formats commonly supports some compression scheme, enhancing their ability to store the indexed color images at smaller file sizes.

A Color Look-up Table (CLUT) is a hardware resource of the display subsystem, which can be used for different purposes. One is to contain the color values for a given palette in some indexed color graphic mode (lets say, 320×200 with 256 colors, often used for computer videogames). Today, CLUTs are used mainly to perform gamma and color temperature calibrations by hardware. Although the term color look-up table was coined in display hardware design field (as the machines always come first), it has been ported to the software jargon as a near synonym of palette too; but in these cases, it can mean not only the color map of an indexed color image but also any intermediary look-up table which maps one colors into another, regardless of indexed or truecolor is used. In order to avoid confusion, the term CLUT is preferred for the color hardware registers and palette for the software color maps when both are employed in the same paper.

Grayscale images usually do not need palettes. The pixel values can be directly the gray level in a given range (0 to 15, 0 to 255), so image files that deal with grayscale images usually do not store a palette color map for this purpose. But when displayed with color devices, generally it is necessary to synthesize a grayscale color map to manage the image properly (either by loading the color hardware registers/CLUT, or by converting the image to RGB in an RGB video memory). Some image file formats, such as BMP file format implement grayscale by storing a grayscale palette made with full RGB values.

Color depth denotes how many bits are employed to store color information in the image pixels: the more the colors managed, the more the bits employed. The pixel's bit patterns can be interpreted as whole integer numbers (which is the case for indexed color images' indices) or by assigning some bits for color related management, as relative intensities for every primary red-green-blue in RGB truecolor images. Indexed color palette sizes often have up to 2 raised to some power entries, which easily match pixel's depth bit patterns: 22 = 4, 24 = 16 or 28 = 256 are the most common choices. Highcolor uses RGB full palettes either 15-bits and 16-bits depth, while truecolor uses RGB full palettes of 24-bits depth or greater.

Read more about this topic:  Palette (computing)

Famous quotes containing the words related and/or terms:

    One does not realize the historical sensation as a re-experiencing, but as an understanding that is closely related to the understanding of music, or rather of the world by means of music.
    Johan Huizinga (1872–1945)

    For my part, if a lie may do thee grace,
    I’ll gild it with the happiest terms I have.
    William Shakespeare (1564–1616)