What is indexed colour?
Indexed colour (or pseudocolour), is the provision of a relatively small number, say 256, of discrete colours in a colormap or palette. The framebuffer stores, at each pixel, the index number of a colour. At the output of the framebuffer, a lookup table uses the index to retrieve red, green and blue components that are then sent to the display. The colours in the map may be fixed systematically at the design of a system. As an example, 216 index entries an eight-bit indexed colour system can be partitioned systematically into a 6 x 6 x 6 “cube” to implement what amounts to a direct colour system where each of red, green and blue has a value that is an integer in the range zero to five. An RGB image can be converted to a predetermined colormap by choosing, for each pixel in the image, the colormap index corresponding to the “closest” RGB triple. With a systematic colormap such as a 6 x 6 x 6 colourcube this is straightforward. For an arbitrary colormap, the colormap has to be searched l