Generated by DeepSeek V3.2Indexed color is a technique used in digital imaging where each pixel in an image does not directly specify a color, but instead holds an index, or reference, to a single color in a separate, limited table of colors known as a color palette or CLUT. This method was developed to dramatically reduce the memory and storage requirements for images, particularly during the era of early personal computers and video game consoles with constrained hardware. By using a palette, an image that might otherwise require 24 bits per pixel can be represented with just 4 or 8 bits per pixel, enabling complex graphics on systems with limited video memory and CPU power. The technique represents a fundamental form of lossy compression for color data, trading a reduced range of colors for improved efficiency.
In an indexed color image, the pixel data consists of an array of index values, each typically 1, 2, 4, or 8 bits in size. A separate data structure, the color lookup table, contains the actual RGB or CMYK color definitions. When the image is displayed, the graphics processing unit or software reads each pixel's index and uses it to look up the corresponding color value from the table, which is then sent to the display device. This process is distinct from truecolor or direct color modes, where pixel values directly represent color intensities. The concept is analogous to the use of a numbered paint-by-numbers kit or the limited color selection in early animated cartoon cel animation, where a specific number corresponds to a pre-mixed paint.
The color palette, also called a CLUT, is the cornerstone of the indexed color system. Its size is determined by the bit depth of the pixel indices; an 8-bit index can address a palette of up to 256 colors, while a 4-bit index is limited to 16 colors. The selection of colors within this palette is critical and is often optimized for a specific image through a process called color quantization, performed by algorithms like the median cut algorithm or octree quantization. For consistent display across different systems, standardized palettes were created, such as the web-safe palette for early web browsers and the fixed EGA and VGA hardware palettes used by IBM PC compatibles. The Microsoft Windows system also defined default palettes for its GUI elements.
The primary advantage of indexed color is its efficiency in memory and bandwidth, allowing for faster image manipulation and smaller file sizes, which was paramount for systems like the Commodore 64, Nintendo Entertainment System, and early IBM PCs with CGA or EGA graphics. This made it ideal for computer games, GUI interfaces, and early internet graphics. The main limitation is the restricted color range, which can lead to visible color banding and posterization, especially in images with smooth gradients like photographs. A phenomenon known as palette flashing could occur in animations when the limited palette had to be swapped between frames. Furthermore, displaying multiple full-color images simultaneously was challenging, as seen on platforms like MS-DOS.
Indexed color was the dominant color graphics mode throughout the 1980s and early 1990s across numerous computing and gaming platforms. Early arcade games from Atari and Capcom utilized dedicated hardware with fixed palettes. The Amiga computer, developed by Commodore International, featured the Original Chip Set which excelled at displaying multiple indexed color sprites and playfields. In the IBM PC realm, the VGA standard's 256-color mode became a landmark for DOS-based gaming and applications, used by titles from id Software and Sierra On-Line. Apple Inc.'s Macintosh systems also employed indexed color in their early QuickDraw graphics system. The technique was equally vital for the Super Nintendo Entertainment System and Sega Genesis.
While largely supplanted by truecolor displays in modern operating systems like Microsoft Windows and macOS, indexed color remains relevant in specific applications where file size or compatibility is paramount. The GIF file format, ubiquitous for simple web graphics and animated images, exclusively uses indexed color, supporting up to 256 colors per frame. The PNG format supports both truecolor and indexed color, with the latter being optimal for images with large areas of flat color, such as screenshots of software applications, pixel art, and logos. It is also used in embedded systems, mobile devices with limited resources, and in the texture compression of some video game assets for platforms like the Nintendo 3DS.
Category:Computer graphics Category:Color