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 most refined skills of color printing, the intricate techniques of wide-angle photography, provide us pictures of trivia bigger and more real than life. We forget that we see trivia and notice only that the reproduction is so good. Man fulfils his dream and by photographic magic produces a precise image of the Grand Canyon. The result is not that he adores nature or beauty the more. Instead he adores his camera—and himself.
    Daniel J. Boorstin (b. 1914)

    I have heard that hysterical women say
    They are sick of the palette and fiddle-bow,
    Of poets that are always gay,
    William Butler Yeats (1865–1939)