Indexed color
Encyclopedia
In computing, indexed color is a technique to manage digital image
Digital image
A digital image is a numeric representation of a two-dimensional image. Depending on whether or not the image resolution is fixed, it may be of vector or raster type...

s' colors in a limited fashion, in order to save computer memory and file storage, while speeding up display refresh and file transfers. It is a form of vector quantization compression.

When an image is encoded in this way, color information is not directly carried by the image pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

 data, but is stored in a separate piece of data called a palette
Palette (computing)
In computer graphics, a palette is either a given, finite set of colors for the management of digital images , or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors .Depending on the context In computer graphics, a palette is either a given,...

: an array of color elements, in which every element, a color, is indexed by its position within the array. The image pixels do not contain the full specification of its color, but only its index in the palette. This technique is sometimes referred as pseudocolor or indirect color, as colors are addressed indirectly.

Perhaps the first device that supported palette colors was a random-access frame buffer, described in 1975 by Kajiya, Sutherland and Cheadle. This supported a palette of 256 36-bit RGB colors.

Palette size

The palette itself stores a limited number of distinct colors; 4, 16 or 256 are the most common cases. These limits are often imposed by the target architecture's display adapter
Video card
A video card, Graphics Card, or Graphics adapter is an expansion card which generates output images to a display. Most video cards offer various functions such as accelerated rendering of 3D scenes and 2D graphics, MPEG-2/MPEG-4 decoding, TV output, or the ability to connect multiple monitors...

 hardware
Computer hardware
Personal computer hardware are component devices which are typically installed into or peripheral to a computer case to create a personal computer upon which system software is installed including a firmware interface such as a BIOS and an operating system which supports application software that...

, so it is not a coincidence that those numbers are exact powers of two (the binary code
Binary code
A binary code is a way of representing text or computer processor instructions by the use of the binary number system's two-binary digits 0 and 1. This is accomplished by assigning a bit string to each particular symbol or instruction...

): 22 = 4, 24 = 16 and 28 = 256. While 256 values can be fitted into a single 8-bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

 byte
Byte
The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

 (and then a single indexed color pixel also occupies a single byte), pixel indices with 16 (4-bit, a nibble
Nibble
In computing, a nibble is a four-bit aggregation, or half an octet...

) or fewer colors can be packed together into a single byte (two nibbles per byte, if 16 colors are employed, or four 2-bit pixels per byte if using 4 colors). Sometimes, 1-bit (2-color) values can be used, and then up to eight pixels can be packed into a single byte; such images are considered binary image
Binary image
A binary image is a digital image that has only two possible values for each pixel. Typically the two colors used for a binary image are black and white though any two colors can be used. The color used for the object in the image is the foreground color while the rest of the image is the...

s (sometimes referred as a bitmap or bilevel image) and not an indexed color image.
In order to save even more space, some indexed color image file
Image file formats
Image file formats are standardized means of organizing and storing digital images. Image files are composed of either pixels, vector data, or a combination of the two. Whatever the format, the files are rasterized to pixels when displayed on most graphic displays...

s store only the used colors in a given image and not a full palette of entries for the pixel depth employed. Thus, it is not rare to find palette sizes of anywhere between 3 and 255 entries instead of 256 (for 8 bpp) in such files.

If simple video overlay is intended through a transparent color, one palette entry is specifically reserved for this purpose, and it is discounted as an available color. Some machines, such as the MSX
MSX
MSX was the name of a standardized home computer architecture in the 1980s conceived by Kazuhiko Nishi, then Vice-president at Microsoft Japan and Director at ASCII Corporation...

 series, had the transparent color reserved by hardware.

Indexed color images with palette sizes beyond 256 entries are rare. The practical limit is around 12-bit per pixel, 4,096 different indices. To use indexed 16 bpp or more does not provide the benefits of the indexed color images' nature, due to the color palette size in bytes being greater than the raw image data itself. Also, useful direct RGB Highcolor modes can be used from 15 bpp and up.

If an image has many subtle color shades, it is necessary to select a limited repertoire of colors to approximate the image using color quantization
Color quantization
In computer graphics, color quantization or color image quantization is a process that reduces the number of distinct colors used in an image, usually with the intention that the new image should be as visually similar as possible to the original image. Computer algorithms to perform color...

. Such a palette is frequently insufficient to represent the image accurately; difficult-to-reproduce features such as gradient
Gradient
In vector calculus, the gradient of a scalar field is a vector field that points in the direction of the greatest rate of increase of the scalar field, and whose magnitude is the greatest rate of change....

s will appear blocky or as strips (color banding
Colour banding
Colour banding is a problem of inaccurate colour presentation in computer graphics. While in 24 bit colour modes, 8 bits per channel should be enough to render images in the full visible spectrum, in some cases there is a risk of producing abrupt changes between shades of the same colour...

). In those cases, it is usual to employ dither
Dither
Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images...

ing, which mixes different-colored pixels in patterns, exploiting the tendency of human vision to blur nearby pixels together, giving a result visually closer to the original one.

Here is a typical indexed 256-color image and its own palette (shown as a rectangle of swatches):
 

Colors and palettes

See also List of palettes


How the colors are encoded within the color palette map of a given indexed color image depends on the target platform.

Early color techniques

Many early personal
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

 and home computer
Home computer
Home computers were a class of microcomputers entering the market in 1977, and becoming increasingly common during the 1980s. They were marketed to consumers as affordable and accessible computers that, for the first time, were intended for the use of a single nontechnical user...

s had very limited proprietary color full palettes made up of different color space
Color space
A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components...

s implemented directly in their own hardware, so the color indices were imposed by the manufacturer, such as those of the Apple II and the Commodore 64. This had the advantage that the mapping between the pixels' values and their corresponding colors was implicit, and then rarely (if ever) was the color map stored as a separate file or as part of an image file.

As display hardware evolved, available full palettes grew beyond the systems' maximum color depth
Color depth
In computer graphics, color depth or bit depth is the number of bits used to represent the color of a single pixel in a bitmapped image or video frame buffer. This concept is also known as bits per pixel , particularly when specified along with the number of bits used...

 (the number of different values a pixel can hold), due to their otherwise still limited video memory
Video memory
Video memory is a term generally used in computers to describe some form of writable memory, usually RAM, dedicated to the purpose of holding the information necessary for a graphics card to drive a display device...

. For that reason, indexed color images needed to select a limited repertoire of colors from the wider full palette. Thus, programs had to load the image colors into the display's color hardware registers/CLUT (or perform other special settings) before loading the image pixels into video memory, which meant that the image palette (i.e. the values to set the actual screen colors) had to be stored along with the raw image data.

RGB

Hardware palettes based on composite video
Composite video
Composite video is the format of an analog television signal before it is combined with a sound signal and modulated onto an RF carrier. In contrast to component video it contains all required video information, including colors in a single line-level signal...

 colors such as YPbPr
YPbPr
' is a color space used in video electronics, in particular in reference to component video cables. is the analog version of the YCBCR color space; the two are numerically equivalent, but YPBPR is designed for use in analog systems whereas YCBCR is intended for digital video. cables are also...

 or the like were generally replaced in the mid 1980s by the more flexible RGB color model
RGB color model
The RGB color model is an additive color model in which red, green, and blue light is added together in various ways to reproduce a broad array of colors...

, in which a given color can be obtained by mixing different amounts of the three primary color
Primary color
Primary colors are sets of colors that can be combined to make a useful range of colors. For human applications, three primary colors are usually used, since human color vision is trichromatic....

s red, green, and blue. Although the total number of different colors depends on the number of levels per primary, and on a given hardware implementation (a 9-bit RGB provides 512 combinations, a 12-bit RGB provides 4,096, and so on), in this model Digital-to-Analog Converter
Digital-to-analog converter
In electronics, a digital-to-analog converter is a device that converts a digital code to an analog signal . An analog-to-digital converter performs the reverse operation...

s (DAC) can generate the colors — simplifying the hardware design — while the software can treat the number per levels used abstractly and manage the RGB colors in a device-independent fashion. With colors stored in RGB format within the palettes of indexed image files, any image can be displayed (through appropriate transformations) on any such system, regardless of the color depth used in the hardware implementation.

Today, display hardware and image file formats
Image file formats
Image file formats are standardized means of organizing and storing digital images. Image files are composed of either pixels, vector data, or a combination of the two. Whatever the format, the files are rasterized to pixels when displayed on most graphic displays...

 that deal with indexed color images almost exclusively manage colors in RGB format, the de-facto standard encoding being the so-called truecolor or 24-bit RGB, with 16,777,216 different possible colors. However, indexed color images are not genuinely constrained to a 24-bit RGB color encoding; image palettes can hold any type of color encoding. For example, the PDF file format does support indexed color in other colorspaces, notably CMYK
CMYK color model
The CMYK color model is a subtractive color model, used in color printing, and is also used to describe the printing process itself. CMYK refers to the four inks used in some color printing: cyan, magenta, yellow, and key...

, and Adobe Distiller by default will convert images to indexed color whenever the total number of colors in an image is equal to or less than 256. When using RGB, the TIFF and PNG file formats can optionally store the RGB triplets with a precision of 16-bit (65,536 levels per component) yielding a total of 48 bits per pixel. A proposed extension to the TIFF Standard allows non-RGB color palettes, but this was never implemented in software due to technical reasons. The color map table of the BMP file format indexed color mode stores its entries in BGR order rather than RGB, and has (in the current version) an additional unused byte for padding to conform to 32-bit
32-bit
The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295. Hence, a processor with 32-bit memory addresses can directly access 4 GB of byte-addressable memory....

 word alignment
Data structure alignment
Data structure alignment is the way data is arranged and accessed in computer memory. It consists of two separate but related issues: data alignment and data structure padding. When a modern computer reads from or writes to a memory address, it will do this in word sized chunks...

 during processing, but it is essentially still a 24-bit RGB color encoding. (An earlier version of the BMP format used three bytes per 24-bit color map table entry, and many files in that format are still in circulation, so many modern programs that read BMP files support both variations.)

Pixel bits arrangements

Except for very low resolution graphic modes, early home and personal computers rarely implemented an "all-pixels-addressable" design - that is, the ability to change a single pixel to any of the available colors independently. Their limitations came from employing separate color attribute or color RAM areas, leading to attribute clash
Attribute clash
Attribute clash was a display artifact caused by limits in the graphics circuitry of a number of early color 8-bit home computers, most notably the Sinclair Research ZX Spectrum, where it meant that only two colors could be used in any area of 8×8 pixels...

 effects. Also, the pixel bits and/or the scan lines of the video memory were commonly arranged in odd ways convenient for the video generator hardware (thus saving hardware costs in a cost-competitive market), but sometimes creating difficulty for the people writing graphics programs. A pixel's bits in indexed-color, all-pixel-addressable images are not always contiguous in video memory or image files (i.e., chunky organization is not always used.) Some video hardware, such as the 16-color graphic modes of the Enhanced Graphics Adapter
Enhanced Graphics Adapter
The Enhanced Graphics Adapter is the IBM PC computer display standard specification which is between CGA and VGA in terms of color and space resolution. Introduced in October 1984 by IBM shortly after its new PC/AT, EGA produces a display of 16 simultaneous colors from a palette of 64 at a...

 (EGA) and Video Graphics Array
Video Graphics Array
Video Graphics Array refers specifically to the display hardware first introduced with the IBM PS/2 line of computers in 1987, but through its widespread adoption has also come to mean either an analog computer display standard, the 15-pin D-subminiature VGA connector or the 640×480 resolution...

 (VGA) for IBM PC compatible
IBM PC compatible
IBM PC compatible computers are those generally similar to the original IBM PC, XT, and AT. Such computers used to be referred to as PC clones, or IBM clones since they almost exactly duplicated all the significant features of the PC architecture, facilitated by various manufacturers' ability to...

s
or the Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

 video buffer
are arranged as a series of bit plane
BIT plane
This article is about Natalie Jeremijenko and the Bureau of Inverse Technology's project. For the company, see Bitplane. For the digital information term, see bit plane....

s (in a configuration called planar
Planar
In computer graphics, planar is the method of representing pixel colours with several bitplanes of RAM. Each bit in a bitplane is related to one pixel on the screen...

), in which the related bits of a single pixel are split among several independent bitmap
Binary image
A binary image is a digital image that has only two possible values for each pixel. Typically the two colors used for a binary image are black and white though any two colors can be used. The color used for the object in the image is the foreground color while the rest of the image is the...

s. Thus, the pixel bits are conceptually aligned along the 3D Z-axis. (The "depth" concept here is not the same as that of pixel depth
Color depth
In computer graphics, color depth or bit depth is the number of bits used to represent the color of a single pixel in a bitmapped image or video frame buffer. This concept is also known as bits per pixel , particularly when specified along with the number of bits used...

.)

Early image file formats, as PIC
PICtor PIC image format
PICtor is an image file format developed by John Bridges, the principal author of PCPaint, the first Paintbrush program for the PC. It was also the native file format for Pictor Paint and GRASP and became the first widely accepted DOS imaging standard.-Typical file format:The PICtor format is a...

, stored little more than a bare memory dump of the video buffer of a given machine.

Some indexed-color image file formats as Graphics Interchange Format (GIF) allow the image's scan lines to be arranged in interleaved fashion (not linear order), which allows a low resolution version of the image to appear on screen while it is still downloading, so that the computer user can gain an idea of its contents during the seconds before the whole image arrives. Here is an example of a typical vertically interleaved download in four steps:



As seen here, the image has been divided into four groups of lines: group A contains every fourth line, group B contains lines immediately following ones in group A, group C likewise contains the lines immediately following those in group B, and group D contains the remaining lines, which are between group C lines (immediately above) and group A lines (immediately below). These are stored into the file in the order A, C, B, D, so that when the file is transmitted the second received group (C) of lines lie centered between the lines of the first group, yielding the most spatially uniform and recognizable image possible, composed of only two of the groups of lines. The same technique can be applied with more groups (e.g. eight), in which case at each step the next group to be sent contains lines lying at or near the centers of remaining bands that are not yet filled with image data. This method, with four or eight groups of lines, was commonly used on the early World Wide Web during the second half of the 1990s. Rather than leaving the background (black) showing as in the illustration above, the partial image was often presented on screen by duplicating each line to fill the space below it down to the next received image line. The end result was a continuous image with decreased vertical resolution that would increase to full resolution over a few seconds as the later parts of the image data arrived.

Advantages

Indexed color saves a lot of memory, storage space, and transmission time: using truecolor, 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, or 1 byte each, 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 in itself (assuming RGB), approx. 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.

Indexed color was widely used in early personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

s and display adapters' hardware to reduce costs (mainly, fewer then-expensive RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

 chips
Integrated circuit
An integrated circuit or monolithic integrated circuit is an electronic circuit manufactured by the patterned diffusion of trace elements into the surface of a thin substrate of semiconductor material...

) but also for convenient image management with limited-power CPUs (of the order of 4 to 8 MHz), file storage (cassette tape
Magnetic tape data storage
Magnetic tape data storage uses digital recording on to magnetic tape to store digital information. Modern magnetic tape is most commonly packaged in cartridges and cassettes. The device that performs actual writing or reading of data is a tape drive...

s and low density floppy disk
Floppy disk
A floppy disk is a disk storage medium composed of a disk of thin and flexible magnetic storage medium, sealed in a rectangular plastic carrier lined with fabric that removes dust particles...

s). Notable computer graphics systems extensively (or even exclusively) using pseudocolor palettes in the 1980s include CGA
Color Graphics Adapter
The Color Graphics Adapter , originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter, introduced in 1981, was IBM's first color graphics card, and the first color computer display standard for the IBM PC....

, EGA
Enhanced Graphics Adapter
The Enhanced Graphics Adapter is the IBM PC computer display standard specification which is between CGA and VGA in terms of color and space resolution. Introduced in October 1984 by IBM shortly after its new PC/AT, EGA produces a display of 16 simultaneous colors from a palette of 64 at a...

, and VGA
Video Graphics Array
Video Graphics Array refers specifically to the display hardware first introduced with the IBM PS/2 line of computers in 1987, but through its widespread adoption has also come to mean either an analog computer display standard, the 15-pin D-subminiature VGA connector or the 640×480 resolution...

 (for IBM PC compatible
IBM PC compatible
IBM PC compatible computers are those generally similar to the original IBM PC, XT, and AT. Such computers used to be referred to as PC clones, or IBM clones since they almost exactly duplicated all the significant features of the PC architecture, facilitated by various manufacturers' ability to...

s), the Atari ST
Atari ST
The Atari ST is a home/personal computer that was released by Atari Corporation in 1985 and commercially available from that summer into the early 1990s. The "ST" officially stands for "Sixteen/Thirty-two", which referred to the Motorola 68000's 16-bit external bus and 32-bit internals...

, and Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

's OCS
Original Amiga chipset
The Original Chip Set was a chipset used in the earliest Commodore Amiga computers and defined the Amiga's graphics and sound capabilities...

 and AGA
Advanced Graphics Architecture
Advanced Graphics Architecture is the third generation Amiga graphic chip set, first used in the Amiga 4000 in 1992. AGA was codenamed the Pandora chipset by Commodore International internally....

.

Image files exchanged over the Compuserve
CompuServe
CompuServe was the first major commercial online service in the United States. It dominated the field during the 1980s and remained a major player through the mid-1990s, when it was sidelined by the rise of services such as AOL with monthly subscriptions rather than hourly rates...

 net in the early 1990s were encapsulated in the GIF format. Later, the HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 web pages used the GIF along with other indexed color-supporting file formats such as PNG, to exchange limited-color images quickly and store them in limited storage space.

Most image file formats
Image file formats
Image file formats are standardized means of organizing and storing digital images. Image files are composed of either pixels, vector data, or a combination of the two. Whatever the format, the files are rasterized to pixels when displayed on most graphic displays...

 that support indexed color images also commonly support some compression
Image compression
The objective of image compression is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form.- Lossy and lossless compression :...

 scheme, enhancing their ability to store the images in smaller files.

Interesting colorized and artistic effects can be easily achieved by altering the color palette of indexed color images, for example to produce colorized sepia tone images. Due to the separate nature of the associated palette element of the indexed color images, they are ideal to remap grayscale
Grayscale
In photography and computing, a grayscale or greyscale digital image is an image in which the value of each pixel is a single sample, that is, it carries only intensity information...

 images into false color ones through the use of false color palettes.

Simple video overlay can be achieved easily through the transparent color technique.

By manipulating the color hardware registers (Color look-up table or CLUT) of the display adapter in the indexed color graphic modes, full-screen color-animation effects can be achieved without redrawing the image - that is, at low CPU time cost; a single change of the register values affects the whole screen at once. Color-map animation is extensively used in the demoscene
Demoscene
The demoscene is a computer art subculture that specializes in producing demos, which are non-interactive audio-visual presentations that run in real-time on a computer...

. The Microsoft Windows boot logo screen in Windows 95, 98, ME, and 2000 Professional (which uses VGA 320x200x256 color display mode because it is the greatest common denominator on all PCs) employs this technique for the scrolling gradient bar across the bottom of the screen; the picture is a static image with no pixels rewritten after it is initially displayed. Custom boot screen images could tap the cycled colors to animate other parts of the images.

Disadvantages

The main disadvantage of using indexed color is the limited set of simultaneous colors per image. Small 4- or 16-color palettes are still acceptable for little images (icons
Icon (computing)
A computer icon is a pictogram displayed on a computer screen and used to navigate a computer system or mobile device. The icon itself is a small picture or symbol serving as a quick, intuitive representation of a software tool, function or a data file accessible on the system. It functions as an...

) or very simple graphics, but to reproduce real life images they become nearly useless. Some techniques, such as color quantization
Color quantization
In computer graphics, color quantization or color image quantization is a process that reduces the number of distinct colors used in an image, usually with the intention that the new image should be as visually similar as possible to the original image. Computer algorithms to perform color...

, anti-aliasing
Anti-aliasing
In digital signal processing, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution image at a lower resolution...

 and dithering combined together can create indexed 256-color images comparable to the original up to an acceptable level.

For comparison, here is the same image rendered with a 4-, 16-, and 256-color size with adaptive palettes (the best picked selected colors) without dithering, (full truecolor version at top):


Indexed color images are heavily dependent on their own color palettes. Except for a few well known fixed-color palettes (such as that of the Color Graphics Adapter
Color Graphics Adapter
The Color Graphics Adapter , originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter, introduced in 1981, was IBM's first color graphics card, and the first color computer display standard for the IBM PC....

—CGA), raw image data and/or color map tables cannot be reliably exchanged between different image files without some kind of intermediate mapping. Also, if the original color palette for a given indexed image is lost, it can be nearly impossible to restore it. Here is an example of what happens when an indexed color image (the previous parrot) has been associated with an incorrect color palette:


Indexed color graphic modes for display adapters have the 16- or 256-color limit imposed by hardware. Indexed color images with rich but incompatible palettes can only be accurately displayed one at a time, as in a slideshow
Slideshow
A slide show is a display of a series of chosen information or pictures, done for artistic or instructional purposes. Slide shows are conducted by a presenter using an apparatus, such as a carousel slide projector, an overhead projector or in more recent years, a computer running presentation...

. When it is necessary to show multiple images together, as in a mosaic of thumbnail
Thumbnail
Thumbnails are reduced-size versions of pictures, used to help in recognizing and organizing them, serving the same role for images as a normal text index does for words...

s, a common or master palette is often used, which encompasses as many different hues as possible into a single set, thereby limiting the overall accurate color availability.

The following image is a mosaic of four different indexed color images rendered with a single shared master palette of 6-8-5 levels RGB plus 16 additional grays. Note the limited range of colors used for every image, and how many palette entries are left unused.


Many indexed color display devices do not reach the 24-bit limit for the full RGB palette. The VGA
Video Graphics Array
Video Graphics Array refers specifically to the display hardware first introduced with the IBM PS/2 line of computers in 1987, but through its widespread adoption has also come to mean either an analog computer display standard, the 15-pin D-subminiature VGA connector or the 640×480 resolution...

 for IBM PC compatibles, for example, only provides an 18-bit RGB palette with 262,144 different possible colors in both 16- and 256- indexed color graphic modes.

Some image editing software allows gamma correction
Gamma correction
Gamma correction, gamma nonlinearity, gamma encoding, or often simply gamma, is the name of a nonlinear operation used to code and decode luminance or tristimulus values in video or still image systems...

 to be applied to a palette for indexed color image files. In general, to apply a gamma correction directly to the color map is bad practice, due to the original RGB color values being lost. It is better to apply the gamma correction with the display hardware (most modern display adapters support this feature), or as an active intermediate step of the rendering software through color management
Color management
In digital imaging systems, color management is the controlled conversion between the color representations of various devices, such as image scanners, digital cameras, monitors, TV screens, film printers, computer printers, offset presses, and corresponding media.The primary goal of color...

, which preserves the original color values. Only when the indexed color images are intended for systems that lack any kind of color calibration
Color calibration
The aim of color calibration is to measure and/or adjust the color response of a device to a known state. In ICC terms this is the basis for a additional color characterization of the device and later profiling. In non ICC workflows calibration refers sometimes to establishing a known relationship...

, and they are not intended to be cross-platform, gamma correction may be applied to the color table itself.

Image file formats supporting indexed color

These are some of the most representative image file formats that support indexed color modes. Some of these support other modes (e.g. truecolor), but only the indexed color modes are listed here.
NOTE: most of the formats will also support a color table with fewer colors than the maximum that a given bit depth can offer.

Acronym Full name Creator DOS extension 1-bit (2)  2-bit (4)  3-bit (8) 4-bit (16)  5-bit (32) 6-bit (64) 7-bit (128) 8-bit (256)
8-bit color
8-bit color graphics is a method of storing image information in a computer's memory or in an image file, such that each pixel is represented by one 8-bit byte. The maximum number of colors that can be displayed at any one time is 256....

 
Compression
PCX
PCX
PCX is an image file format developed by the now-defunct ZSoft Corporation of Marietta, Georgia. It was the native file format for PC Paintbrush and became one of the first widely accepted DOS imaging standards, although it has since been succeeded by more sophisticated image formats, such as GIF,...

 
PC Paintbrush
PC Paintbrush
PC Paintbrush was graphics editing software created by the ZSoft Corporation in 1985 for computers running the MS-DOS operating system....

 Image File
ZSoft Corporation
ZSoft Corporation
ZSoft Corporation, founded by Mark Zachmann, was a Marietta, Georgia software company in the 1980s known for the PC Paintbrush software and its PCX graphic file format. ZSoft first merged in 1989 with Mediagenic. When Mediagenic went bankrupt in 1991, Zachmann was able to regain his independence...

.pcx RLE
Run-length encoding
Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run...

ILBM
ILBM
ILBM is a subtype of the Interchange File Format used for storing picture data. ILBM stands for InterLeaved BitMap which refers to the way the pictures are stored. The image data is stored as a varying number of bitplanes, each storing one bit of data for each pixel in the image...

 
InterLeaved BitMap Electronic Arts
Electronic Arts
Electronic Arts, Inc. is a major American developer, marketer, publisher and distributor of video games. Founded and incorporated on May 28, 1982 by Trip Hawkins, the company was a pioneer of the early home computer games industry and was notable for promoting the designers and programmers...

.lbm, .iff Uncompressed, RLE
Run-length encoding
Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run...

GIF  Graphics Interchange Format Compuserve
CompuServe
CompuServe was the first major commercial online service in the United States. It dominated the field during the 1980s and remained a major player through the mid-1990s, when it was sidelined by the rise of services such as AOL with monthly subscriptions rather than hourly rates...

.gif LZW
LZW
Lempel–Ziv–Welch is a universal lossless data compression algorithm created by Abraham Lempel, Jacob Ziv, and Terry Welch. It was published by Welch in 1984 as an improved implementation of the LZ78 algorithm published by Lempel and Ziv in 1978...

TGA
Truevision TGA
Truevision TGA, often referred to as TARGA, is a raster graphics file format created by Truevision Inc. . It was the native format of TARGA and VISTA boards, which were the first graphic cards for IBM-compatible PCs to support Highcolor/truecolor display...

 
TARGA File format Truevision
Truevision
Truevision, Inc. was a maker of digital video processing add-on boards for PC computers. It was founded by Cathleen Asch, Carl Calabria, Joseph Haaf, Bryan Hunt, Brad Pillow, Joe Shepard and Jeff Walters and others when AT&T split off their Electronic Photography and Imaging Center in 1987...

.tga.vda, .icb.vst RLE
Run-length encoding
Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run...

TIFF
Tagged Image File Format
TIFF is a file format for storing images, popular among graphic artists, the publishing industry, and both amateur and professional photographers in general. As of 2009, it is under the control of Adobe Systems...

 
Tagged Image File Format Aldus
Aldus
Aldus Corporation, named after the 15th-century Venetian printer Aldus Manutius, was the inventor of the groundbreaking PageMaker software, a program that is generally credited with creating the desktop publishing field. The company was founded by Jeremy Jaech, Mark Sundstrom, Mike Templeman,...

.tif Uncompressed, PackBits
PackBits
PackBits is a fast, simple lossless compression scheme for run-length encoding of data.Apple introduced the PackBits format with the release of MacPaint on the Macintosh computer. This compression scheme is one of the types of compression that can be used in TIFF-files...

, LZW
LZW
Lempel–Ziv–Welch is a universal lossless data compression algorithm created by Abraham Lempel, Jacob Ziv, and Terry Welch. It was published by Welch in 1984 as an improved implementation of the LZ78 algorithm published by Lempel and Ziv in 1978...

 (**)
BMP  Device-independent Bitmap Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

.bmp, .dib, .rle Uncompressed, RLE
Run-length encoding
Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run...

 (***)
PSD  Photoshop
Adobe Photoshop
Adobe Photoshop is a graphics editing program developed and published by Adobe Systems Incorporated.Adobe's 2003 "Creative Suite" rebranding led to Adobe Photoshop 8's renaming to Adobe Photoshop CS. Thus, Adobe Photoshop CS5 is the 12th major release of Adobe Photoshop...

 Document
Adobe Systems
Adobe Systems
Adobe Systems Incorporated is an American computer software company founded in 1982 and headquartered in San Jose, California, United States...

.psd PackBits
PackBits
PackBits is a fast, simple lossless compression scheme for run-length encoding of data.Apple introduced the PackBits format with the release of MacPaint on the Macintosh computer. This compression scheme is one of the types of compression that can be used in TIFF-files...

PNG  Portable Network Graphics PNG Development Group .png DEFLATE
DEFLATE
Deflate is a lossless data compression algorithm that uses a combination of the LZ77 algorithm and Huffman coding. It was originally defined by Phil Katz for version 2 of his PKZIP archiving tool and was later specified in RFC 1951....


  • 64- (true, not EHB), 128- and 256-color modes only available for the AGA Amiga chipset.
    • Native support for proprietary compression schemes.
      • RLE with optional proprietary Delta-leaps.

See also

  • Palette (computing)
    Palette (computing)
    In computer graphics, a palette is either a given, finite set of colors for the management of digital images , or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors .Depending on the context In computer graphics, a palette is either a given,...

  • Color depth
    Color depth
    In computer graphics, color depth or bit depth is the number of bits used to represent the color of a single pixel in a bitmapped image or video frame buffer. This concept is also known as bits per pixel , particularly when specified along with the number of bits used...

  • Color Look-Up Table
    CLUT
    A colour look-up table is a mechanism used to transform a range of input colours into another range of colours. It can be a hardware device built into an imaging system or a software function built into an image processing application...

  • List of palettes
  • Image file formats
    Image file formats
    Image file formats are standardized means of organizing and storing digital images. Image files are composed of either pixels, vector data, or a combination of the two. Whatever the format, the files are rasterized to pixels when displayed on most graphic displays...

  • Computer display
    Computer display
    A monitor or display is an electronic visual display for computers. The monitor comprises the display device, circuitry, and an enclosure...

  • List of home computers by video hardware
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK