Framebuffer - Color Palette

Color Palette

Framebuffers have traditionally supported a wide variety of color modes. Due to the expense of memory, most early framebuffers used 1-bit (2-color), 2-bit (4-color), 4-bit (16-color) or 8-bit (256-color) color depths. The problem with such small color depths is that a full range of colors cannot be produced. The solution to this problem was to add a lookup table to the framebuffers. Each "color" stored in framebuffer memory would act as a color index; this scheme was sometimes called "indexed color".

The lookup table served as a palette that contained data to define a limited number (such as 256) of different colors. However, each of those colors, itself, was defined by more than 8 bits, such as 24 bits, eight of them for each of the three primary colors. With 24 bits available, colors can be defined far more subtly and exactly, as well as offering the full range gamut which the display can show. While having a limited total number of colors in an image is somewhat restrictive, nevertheless they can be well chosen, and this scheme is markedly superior to 8-bit color.

The data from the framebuffer in this scheme determined which of the colors in the palette was for the current pixel, and the data stored in the lookup table (sometimes called the "LUT") went to three digital-to-analog converters to create the video signal for the display.

The framebuffer's output data, instead of providing relatively crude primary-color data, served as an index – a number – to choose one entry in the lookup table. In other words, the index determined which color, and the data from the lookup table determined precisely what color to use for the current pixel.

In some designs it was also possible to write data to the LUT (or switch between existing palettes) on the run, allowing to divide the picture into horizontal bars with their own palette and thus render an image that had a far wider palette. For example, viewing an outdoor shot photograph, the picture could be divided into four bars, the top one with emphasis on sky tones, the next with foliage tones, the next with skin and clothing tones, and the bottom one with ground colors. This required each palette to have overlapping colors, but carefully done, allowed great flexibility.

Read more about this topic:  Framebuffer

Famous quotes containing the words color and/or palette:

    The pills are a mother, but better,
    every color and as good as sour balls.
    I’m on a diet from death.
    Anne Sexton (1928–1974)

    The great God endows His children variously. To some he gives intellect—and they move the earth. To some he allots heart—and the beating pulse of humanity is theirs. But to some He gives only a soul, without intelligence—and these, who never grow up, but remain always His children, are God’s fools, kindly, elemental, simple, as if from His palette the Artist of all had taken one color instead of many.
    Mary Roberts Rinehart (1876–1958)