All Topics  
Palette (computing)

 

   Email Print
   Bookmark   Link






 

Palette (computing)



 
 
In computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
, a palette is either a given, finite set of color
Color

Color or colour is the visual perception property corresponding in humans to the categories called red, yellow, blue and others....
s for the management of digital image
Digital image

A digital image is a representation of a two-dimensional using ones and zeros . Depending on whether or not the is fixed, it may be of vector graphics or raster graphics type....
s (that is, a color palette), or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors (such as a tools palette).

Depending on the context (an engineer's technical specification, an advertisement, a programmers' guide, an image file specification, a user's manual, etc.) the term palette and related terms such as Web palette and RGB palette, for example, can have somewhat different meanings.

following are some of the widely used meanings for color palette in computing.









lass="link1" onMouseover='showByLink("m5680068",this)' onMouseout='hide("m5680068")'href="http://www.absoluteastronomy.com/topics/Graphical_user_interface">Graphical user interface
Graphical user interface

A graphical user interface is a type of user interface which allows people to human-computer interaction such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment....
 (GUI) systems use on-screen palettes, including:



See also Indexed color
Indexed color

In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....


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

The RGB color model
RGB color model

The RGB color model is an additive color in which red, green, and blue light are added together in various ways to reproduce a broad array of colors....
 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.






Discussion
Ask a question about 'Palette (computing)'
Start a new discussion about 'Palette (computing)'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
, a palette is either a given, finite set of color
Color

Color or colour is the visual perception property corresponding in humans to the categories called red, yellow, blue and others....
s for the management of digital image
Digital image

A digital image is a representation of a two-dimensional using ones and zeros . Depending on whether or not the is fixed, it may be of vector graphics or raster graphics type....
s (that is, a color palette), or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors (such as a tools palette).

Depending on the context (an engineer's technical specification, an advertisement, a programmers' guide, an image file specification, a user's manual, etc.) the term palette and related terms such as Web palette and RGB palette, for example, can have somewhat different meanings.

Color palettes

The following are some of the widely used meanings for color palette in computing.

  • The total number of colors that a given system is able to generate or manage; the term full palette is often encountered in this sense. For example, Highcolor displays are said to have a 16-bit RGB palette
    List of monochrome and RGB palettes

    This list of monochrome and RGB palettes includes generic repertoires of colors to produce black-and-white and RGB color pictures by a computer's display Computer hardware, not necessarily the total number of such colors that can be simultaneously displayed in a given text or graphic mode of any machine....
    .
  • The limited fixed color selection that a given display adapter can offer when its hardware register
    Hardware register

    In digital electronics, especially computing, a hardware register stores bits of information, in a way that all the bits can be written to or read out simultaneously....
    s are appropriately set (fixed palette selection). For example, 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 International Business Machines's first color graphics card, and the first color computer display standard for the IBM PC....
     (CGA) can be set to show the so-called palette #1 or the palette #2 in color graphic mode: two combinations of 4 fixed colors
    List of 8-bit computer hardware palettes

    This is a list of palette s of some of the most popular early 8-bit personal computers and terminals, roughly those manufactured from 1975 to 1985. Although some of them use List of monochrome and RGB palettes#Regular RGB palettes, are more common specific hardware-implemented 4, 16 or more colors palettes: not bit nor level combinations of RGB pri...
     each.


  • The limited selection of colors that a given system is able to display simultaneously, generally picked from a wider full palette; selected colors or picked colors are also used. In this case, the color selection is always chosen by software, both by the user or by a program. For example, the standard VGA
    Video Graphics Array

    The term Video Graphics Array refers specifically to the display hardware first introduced with the IBM Personal System/2 line of computers in 1987, but through its widespread adoption has also come to mean either an analogue electronics computer display standard, the 15-pin D-subminiature VGA connector or the 640×480 resolution its...
     display adapter is said to provide a palette of 256 simultaneous colors
    List of 16-bit computer hardware palettes

    This is a list of palette s of some of the most popular 16-bit personal computers, roughly those manufactured from 1985 to 1995. All of them are based on List of monochrome and RGB palettes#Regular RGB palettes; although some output in composite video, the internal logic to produce colors is always RGB....
     from a total of 262,144 different colors.
  • The hardware register
    Hardware register

    In digital electronics, especially computing, a hardware register stores bits of information, in a way that all the bits can be written to or read out simultaneously....
    s of the display subsystem in which the selected colors' values are to be loaded in order to show them, also referred as the hardware palette or Color Look-Up Table
    CLUT

    A colour look-up table is a mechanism used to transform a range of input colors into another range of colors. It can be a hardware device built into an imaging system or a software function built into an application....
     (CLUT). For example, the hardware registers of the Commodore Amiga
    Amiga

    The Amiga is a family of personal computers originally developed by Amiga Corporation. Development on the Amiga began in 1982 with Jay Miner as the principal hardware designer....
     are known both as their color palette and their CLUT, depending on sources.


  • A given color selection officially standardized by some body or corporation; default palette or system palette are also used for this meaning. For example, the well known Web colors
    Web colors

    Web colors are colors used in designing world wide web pages, and the methods for describing and specifying those colors.Authors of web pages have a variety of options available for specifying colors for elements of web documents....
     for use with Internet browser
    Web browser

    A Web browser is a application software which enables a user to display and interact with text, images, videos, music, games and other information typically located on a Web page at a website on the World Wide Web or a local area network....
    s, or the Microsoft Windows
    Microsoft Windows

    Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
     default palette
    List of software palettes

    Computer systems that use an 4-bit or 8-bit pixel Color depth can display up to 16 or 256 colors simultaneously. Many personal computers in the early 1990s displayed at most 256 different colors, freely selected by software from their wider hardware's RGB color palette....
    .
  • The limited color selection inside a given indexed color
    Indexed color

    In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....
     image file
    Image file formats

    Image file formats are standardized means of organizing and storing images. This entry is about digital image formats used to store photographic and other images; ....
     as GIF, for example, although the expressions color table or color map are also generally used.


  • The full list of the colors a given digital image
    Digital image

    A digital image is a representation of a two-dimensional using ones and zeros . Depending on whether or not the is fixed, it may be of vector graphics or raster graphics type....
     has, even when the image does not employ indexed color
    Indexed color

    In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....
     pixel
    Pixel

    In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
     encoding; image palette and image colors mean the same.


GUI palettes

Appleiigsos
Graphical user interface
Graphical user interface

A graphical user interface is a type of user interface which allows people to human-computer interaction such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment....
 (GUI) systems use on-screen palettes, including:

  • An arrangement of a limited set of user or system colors that can be chosen. In such cases, the expression color palette or user color palette are common equivalents. This usage resembles a true artist's palette
    Palette

    A 'palette' is: a surface on which a painter mixes colour pigments. A palette may be made of wood, glass, plastic, ceramic tile or other inert material and can vary greatly in size and shape....
    .
  • A tool palette, a rectangular area, called a palette window, of the application screen with button
    Button (computing)

    In computing, a button is a user interface element that provides the user a simple way to trigger an event , like searching for a query at a search engine, or to interact with dialog boxes, like confirming an action....
    s, icon
    Icon (computing)

    On computer displays, a computer icon is a small pictogram. Icons have been used to supplement the normal alphanumerics of the computer. Modern computers now can handle bitmapped graphics on the display terminal, so the icons are widely used to assist users....
    s or another GUI
    Graphical user interface

    A graphical user interface is a type of user interface which allows people to human-computer interaction such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment....
     controls available for quick command or symbol access; if the user is able to place it anywhere by moving it through a mouse
    Mouse (computing)

    In computing, a mouse is a pointing device that functions by detecting dimension motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons....
     or similar pointing device, it is known as a floating palette. A palette for choosing colors can be also a floating palette.


Related terms and technologies

See also Indexed color
Indexed color

In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....


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

The RGB color model
RGB color model

The RGB color model is an additive color in which red, green, and blue light are added together in various ways to reproduce a broad array of colors....
 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
Indexed color

In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....
 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
Bandwidth (computing)

In computer networking and computer science, digital bandwidth, network bandwidth or just bandwidth is a measure of available or consumed data communication resources expressed in bit/s or multiples of it ....
, and to speed up display refresh and telecom transfers. Instead of storing and managing every primary color component of every pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
, 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
Truecolor

Truecolor is a method of representing and storing graphical image information in an RGB color space such that a very large number of colors, shades, and hues can be displayed in an image, such as in high quality photographic images or complex graphics....
, there are 16,777,216 different possible colors
List of monochrome and RGB palettes

This list of monochrome and RGB palettes includes generic repertoires of colors to produce black-and-white and RGB color pictures by a computer's display Computer hardware, not necessarily the total number of such colors that can be simultaneously displayed in a given text or graphic mode of any machine....
, and each pixel needs 24 bits, or 3 byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
s. A typical 640×480 VGA resolution, truecolor uncompressed image needs (900 KiB). Limiting the image colors to 256, every pixel needs only 8 bits, 1 byte, so the example image now needs only (300 KiB), plus 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
Icon (computing)

On computer displays, a computer icon is a small pictogram. Icons have been used to supplement the normal alphanumerics of the computer. Modern computers now can handle bitmapped graphics on the display terminal, so the icons are widely used to assist users....
) 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
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....
, anti-aliasing
Anti-aliasing

In digital signal processing, anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution signal at a lower resolution....
, 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 computer
Personal computer

A personal computer is any general-purpose computer whose original sales price, size, and capabilities 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. Notable computer graphics systems extensively (or even exclusively) using pseudocolor palettes include EGA
Enhanced Graphics Adapter

The Enhanced Graphics Adapter is the IBM PC computer display standard specification located between Color Graphics Adapter and Video Graphics Array in terms of color and space resolution....
 and VGA (for the IBM PC compatible
IBM PC compatible

IBM PC compatible computers are those generally similar to the original IBM Personal Computer, IBM Personal Computer XT, and IBM Personal Computer/AT....
s), the Atari ST
Atari ST

The Atari ST is a home computer/personal computer that was commercially available from 1985 to the early 1990s. It was released by Atari Corporation in 1985....
 and Amiga
Amiga

The Amiga is a family of personal computers originally developed by Amiga Corporation. Development on the Amiga began in 1982 with Jay Miner as the principal hardware designer....
's OCS
Original Amiga chipset

The Original Chip Set was a chipset used in the earliest Commodore International 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....
.

The same way, image file formats used to encapsulate this kind of images, as PCX
PCX

PCX is an graphics file formats developed by the ZSoft Corporation of Marietta, Georgia, USA. It was the native file format for PC Paintbrush and became one of the first widely accepted MS-DOS imaging standards, although its use has since been succeeded by more sophisticated image formats such as Graphics Interchange Format, JPEG, and Portab...
 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 1980's). 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
Image compression

Image compression is the application of Data compression on digital images. In effect, the objective is to reduce redundancy of the image data in order to be able to store or data transmission data in an efficient form....
 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
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....
 and color temperature
Color temperature

Color temperature is a characteristic of visible light that has important applications in lighting, photography, videography, publishing, and other fields....
 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
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 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
List of software palettes

Computer systems that use an 4-bit or 8-bit pixel Color depth can display up to 16 or 256 colors simultaneously. Many personal computers in the early 1990s displayed at most 256 different colors, freely selected by software from their wider hardware's RGB color palette....
 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
Color depth

Color depth or bit depth, is a computer graphics term describing the number of bits used to represent the color of a single pixel in a Raster graphicsped image or video frame buffer....
 denotes how many bit
Bit

A bit is a binary numeral system numerical digit, taking a value of either 0 or 1. Binary digits are a basic unit of information Computer data storage and transmission in digital computing and digital information theory....
s 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: , or are the most common choices. Highcolor uses RGB full palettes either 15-bit
List of monochrome and RGB palettes

This list of monochrome and RGB palettes includes generic repertoires of colors to produce black-and-white and RGB color pictures by a computer's display Computer hardware, not necessarily the total number of such colors that can be simultaneously displayed in a given text or graphic mode of any machine....
s and 16-bits depth
List of monochrome and RGB palettes

This list of monochrome and RGB palettes includes generic repertoires of colors to produce black-and-white and RGB color pictures by a computer's display Computer hardware, not necessarily the total number of such colors that can be simultaneously displayed in a given text or graphic mode of any machine....
, while truecolor uses RGB full palettes of 24-bits depth
List of monochrome and RGB palettes

This list of monochrome and RGB palettes includes generic repertoires of colors to produce black-and-white and RGB color pictures by a computer's display Computer hardware, not necessarily the total number of such colors that can be simultaneously displayed in a given text or graphic mode of any machine....
 or greater.

Adaptive versus master palettes

When using indexed color
Indexed color

In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....
 techniques, real life images are represented with better fidelity to the truecolor
Truecolor

Truecolor is a method of representing and storing graphical image information in an RGB color space such that a very large number of colors, shades, and hues can be displayed in an image, such as in high quality photographic images or complex graphics....
 original one by using adaptive palette
List of software palettes

Computer systems that use an 4-bit or 8-bit pixel Color depth can display up to 16 or 256 colors simultaneously. Many personal computers in the early 1990s displayed at most 256 different colors, freely selected by software from their wider hardware's RGB color palette....
s (sometimes spelled adaptative palettes), in which the colors are selected or quantized
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....
 through some algorithm directly from the original image (by picking the most frequent colors). This way, and with further dithering, the indexed color image can nearly match the original.

But this creates a heavy dependence between the image pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
s and its adaptive palette. Assuming a limited 8-bit depth graphic display, it is necessary to load a given image's adaptive palette into the color hardware registers previously to the load of the image surface in itself into the video frame buffer
Framebuffer

A framebuffer is a video output device that drives a video display from a memory buffer containing a complete video frame of data. The information in the buffer typically consists of color values for every pixel on the screen....
. So to see on the screen different images with different adaptive palettes, they must to be loaded one by one, as in a slideshow
Slideshow

Slideshow is a modern concatenation of "Reversal film Show". A slideshow is a display of a series of chosen images, which is done for artistic or instructional purposes....
. This way, all works fine. Here are samples of four different indexed color images with color patches to show their respective (and largely incompatible) adaptive palettes:



An application can, in turn, show many different image 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 in a mosaic on screen. It is obvious that the program cannot load all the adaptive palettes of every displayed image thumbnail at the same time in the hardware color registers. A solution is to use a unique, common master palette
List of software palettes

Computer systems that use an 4-bit or 8-bit pixel Color depth can display up to 16 or 256 colors simultaneously. Many personal computers in the early 1990s displayed at most 256 different colors, freely selected by software from their wider hardware's RGB color palette....
 or universal palette, which can be used to display with reasonable accuracy any kind of image.

This is done by selecting colors in such way that the master palette comprises a full RGB color space
RGB color space

An RGB color space is any additive color space based on the RGB color model. A particular RGB color space is defined by the three chromaticity of the red, green, and blue additive primaries, and can produce any chromaticity that is the triangle defined by those primary colors....
 "in miniature", limiting the possible levels that the red, green and blue components may have. This kind of arrangement is sometimes referred as a uniform palette. The normal human eye
Eye

Eyes are Organ that detect light, and send signals along the optic nerve to the visual system and other areas of the brain. Complex optical systems with resolving power have come in ten fundamentally different forms, and 96% of animal species possess a complex optical system....
 has sensibility to the three primary colors in different degrees: the more to the green, the less to the blue. So RGB arrangements can take advantage of this by assigning more levels for the green component and less to the blue.

A master palette built this way can be filled with up to , but this does not leave space in the palette for reserved colors, color indices that the program could use for special purposes. It is more general to use only (as in the Web colors
Web colors

Web colors are colors used in designing world wide web pages, and the methods for describing and specifying those colors.Authors of web pages have a variety of options available for specifying colors for elements of web documents....
 case), or , which leave room for some reserved colors.

Then, when loading the mosaic of image thumbnails (or other heterogeneous images), the program simply maps every original indexed color pixel to its most approximated in the master palette (after dumping this into the hardware color registers), and writes the result in the video buffer. Here is a sample of a simple mosaic of the four image thumbnails using a master palette of 240 RGB
List of software palettes

Computer systems that use an 4-bit or 8-bit pixel Color depth can display up to 16 or 256 colors simultaneously. Many personal computers in the early 1990s displayed at most 256 different colors, freely selected by software from their wider hardware's RGB color palette....
 arranged colors plus 16 additional intermediate shades of gray; all images are put together without a significant loss of color accuracy:



Transparent color in palettes

See also Transparency (graphic)
Transparency (graphic)

Transparency is possible in a number of graphics file formats. The term transparency is used in various ways by different people, but at its simplest there is "full transparency" i.e....


A single palette entry in an indexed color
Indexed color

In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....
 image can be designated as a transparent color, in order to perform a simple video overlay
Video overlay

Video overlay is any technique used to display a video window on a computer display while bypassing the chain of Central processing unit -> graphics card -> computer monitor....
: superimposing a given image over a background in such way that some part of the overlapped image obscures the background and the remaining not. Superimposing film/TV titles and credits is a typical application of video overlay.

In the image to be superimposed (indexed color is assumed), a given palette entry plays the role of the transparent color. Usually the index number 0, but other may be chosen if the overlay is performed by software. At design time, the transparent color palette entry is assigned to an arbitrary (usually distinctive) color. In the example below, a typical arrow cursor
Cursor (computers)

In computing, a cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing device....
 for a pointing device
Pointing device

A pointing device is an input interface that allows a user to input spatial data to a computer. Computer-aided design systems and graphical user interfaces allow the user to control and provide data to the computer using physical Mouse gesture ? point, click, and drag ? for example, by moving a hand-held Mouse across the surface of the...
 is designed over an orange background, so here the orange areas denoted the transparent areas (left). At run time
Runtime

In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination ....
, the overlapped image is placed anywhere over the background image, and it is blended in such way that if the pixel color index is the transparent color, the background pixel is kept, otherwise it is replaced. The result is an image with irregular shapes perfectly placed over the background (right).

This technique is used for pointing devices' cursors, in typical 2-D videogames for characters, bullets and so on (the sprite
Sprite (computer graphics)

In computer graphics, a sprite is a two-dimensional/three-dimensional or animation that is integrated into a larger scene.Sprites were originally invented as a method of quickly compositing several images together in two-dimensional video games using special hardware....
s), video titling and other image mixing applications.

Some early computers, as Commodore 64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
, MSX
MSX

MSX was the name of a standardized home computer architecture in the 1980s. It was a Microsoft-led attempt to create unified standards among hardware makers, conceived by one-time Microsoft Japan executive Kazuhiko Nishi....
 and Amiga
Amiga

The Amiga is a family of personal computers originally developed by Amiga Corporation. Development on the Amiga began in 1982 with Jay Miner as the principal hardware designer....
 supports sprites and/or full screen video overlay
Genlock

Genlock is a common technique where the video output of one source, or a specific reference signal, is used to synchronization other television picture sources together....
 by hardware. In these cases, the transparent palette entry number is defined by the hardware, and it used to be the number 0.

Some indexed color image file format
Comparison of graphics file formats

This is a comparison of ....
s as GIF and PNG natively supports the designation of a given palette entry as transparent, freely selectable among any of the palette entries used for a given image. The renderer (a web browser
Web browser

A Web browser is a application software which enables a user to display and interact with text, images, videos, music, games and other information typically located on a Web page at a website on the World Wide Web or a local area network....
, for example) must to interpret it in order to achieve the desired effect when it places the image with transparent areas on screen.

When dealing with truecolor
Truecolor

Truecolor is a method of representing and storing graphical image information in an RGB color space such that a very large number of colors, shades, and hues can be displayed in an image, such as in high quality photographic images or complex graphics....
 images, some video mixing equipment can employ the RGB triplet (0,0,0) (no red, no green, no blue: the darkest shade of black, sometimes referred as superblack in this context) as the transparent color. At design time, it is replaced by the so-called magic pink. The same way, typical desktop publishing
Desktop publishing

Desktop publishing combines a personal computer and WYSIWYG page layout software to create publication documents on a computer for either Publishing or small scale local Multifunction printer output and distribution....
 software can assume pure white, RGB triplet (255,255,255) from photos and illustrations to be excluded in order to let the text paragraphs to invade the image's bounding box
Minimum bounding box

The minimum or smallest bounding or enclosing box for a point set in N dimensions is the box with the smallest measure which all the points lie within....
 for irregular text arrangement around the image's subjects.

2-D painting program
2D computer graphics

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models and by techniques specific to them....
s, like Microsoft Paint and Deluxe Paint
Deluxe Paint

Deluxe Paint is a bitmap graphics editor originally created by Dan Silva for Electronic Arts . The original version was created for the Commodore Amiga and was released in November 1985....
, can employ the user designated background color as the transparent color when performing cut, copy, and paste operations.

Although related (due to they are used for the same purposes), image bit mask
Mask (computing)

In computer science, a mask is data that is used for bitwise operations.Using a mask, multiple bits in a byte, nibble, word can be set either on, off or inverted from on to off in a single bitwise operation....
s and alpha channels are techniques which not involve the use of palettes nor transparent color at all, but off-image added extra binary data layers.

System and logical palettes under Microsoft Windows

Microsoft Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 applications manage the palette of 4-bit or 8-bit indexed color display devices through specialized functions of the Win32 API (for Highcolor and Truecolor
Truecolor

Truecolor is a method of representing and storing graphical image information in an RGB color space such that a very large number of colors, shades, and hues can be displayed in an image, such as in high quality photographic images or complex graphics....
 display modes, such functions lacks any interesting functionality). These APIs deals with the so-called system palette and with many logical palettes.

The system palette is a copy in RAM
Ram

Ram, ram, or RAM as a non-acronymic wordAs a non-acronymic word Ram, ram, or RAM may refer to:...
 of the color display's hardware registers, primarily a physical palette, and it is a unique, shared common resource of the system. At boot, it is loaded with the default system palette
List of software palettes

Computer systems that use an 4-bit or 8-bit pixel Color depth can display up to 16 or 256 colors simultaneously. Many personal computers in the early 1990s displayed at most 256 different colors, freely selected by software from their wider hardware's RGB color palette....
 (mainly a master palette which works well enough with most programs).

When a given application intends to output colorized graphics and/or images, it can set their own logical palette, that is, its own private selection of colors (up to 256). It is supposed that every graphic element that the application tries to show on screen employs the colors of its logical palette. Every program can manage freely one or more logical palettes without further expected interference (in advance).

Before the output is effectively made, the program must to realize its logical palette: the system tries to match then the logical colors with physical ones. If an intended color is already present into the system palette, the system internally maps both the logical and the system palette indexes (due to they rarely coincide). If the intended color is not present yet, the system applies an internal algorithm to discard the least used color in the system palette (generally, some used by another window in the background) and substitutes it with the new color. Due to there are limited room for colors in the system palette, the algorithm tries also to remap similar colors together, and always by avoiding redundant colors.

The final result depends on how many applications are working with on screen colors. The foreground window is always favoured, so windows at background may behave in different ways: from become corrupted to quickly redraw themselves. When the system palette changes, the system triggers a specific event
Event-driven programming

In computer programming, event-driven programming or event-based programming is a programming paradigm in which the Program flow is determined by event s — i.e., sensor outputs or user actions or Message passing from other programs or Thread_....
 to inform every application. When received, a window can quickly redraw itself using a single Win32 API function. But this must be doing explicitly in the program code; hence the fact that many programs lack in manage this event, and their windows become corrupt in this situation.

An application can force the system palette to be loaded with specific colors and even in a specific order, tricking the system by telling they are color entries intended for animation (quick color changes of the colors in the physical palette at specific entries). The system cannot assume then that every hardware palette entry is free for their palette color managements, and those entries are excluded from its algorithm. The final result depend on the skills of the color forcing program and the behaviour of the other programs (the lasts exactly as in the regular case), and that of the operating system in itself.

See also

  • Indexed color
    Indexed color

    In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer's computer data storage and Hard disk drive, while speeding up display refresh and telecom transfers....
  • Color depth
    Color depth

    Color depth or bit depth, is a computer graphics term describing the number of bits used to represent the color of a single pixel in a Raster graphicsped image or video frame buffer....
  • Color Look-Up Table
    CLUT

    A colour look-up table is a mechanism used to transform a range of input colors into another range of colors. It can be a hardware device built into an imaging system or a software function built into an application....
  • List of palettes
    List of palettes

    This article is a list of the palette s for notable computer graphics, terminals and video game consoles hardware.Only a sample and the palette's name are given here....