Sunday, 18 March 2012

Color palette

Framebuffers accept commonly accurate a advanced array of blush modes. Due to the amount of memory, best aboriginal framebuffers acclimated 1-bit (2 color), 2-bit (4 color), 4-bit (16 color) or 8-bit (256 color) blush depths. The botheration with such baby blush base is that a abounding ambit of colors cannot be produced. The band-aid to this botheration was to add a lookup table to the framebuffers. Anniversary "color" stored in framebuffer anamnesis would act as a blush index; this arrangement was sometimes alleged "indexed color".

The lookup table served as a palette that independent abstracts to ascertain a bound cardinal (such as 256) of altered colors. However, anniversary of those 256 colors, itself, was authentic by added than 8 bits, such as 24 bits, eight of them for anniversary of the three primary colors. With 24 $.25 available, colors can be authentic far added cautiously and exactly, as able-bodied as alms the abounding ambit area which the affectation can show. While accepting a bound absolute cardinal of colors in an angel is somewhat restrictive, about they can be able-bodied chosen, and this arrangement is clearly above to 8-bit color.

The abstracts from the framebuffer in this arrangement bent which of the 256 colors in the palette was for the accepted pixel, and the abstracts stored in the lookup table (sometimes alleged the "LUT") went to three digital-to-analog converters to actualize the video arresting for the display.

The framebuffer's achievement data, instead of accouterment relatively-crude primary-color data, served as an basis – a cardinal – to accept one access in the lookup table. In added words, the basis bent which color, and the abstracts from the lookup table bent absolutely what blush to use for the accepted pixel.

No comments:

Post a Comment