Skip to main content
gamedev.net
🔒 Locked

Palette????

Started by sab3156 0 replies 250+ views
Original Post
sab3156
sab3156
What in god''s name is a palette? i was flipping through some game development sites and found things like ''color palettes''. what are they?
Air-Conditioners are like computers. They stop working when you open windows.
Arek the Absolute
Arek the Absolute
A palette is a means of reducing the amount of space needed to store images. You''ve used them before, I''m confident, as many images use them. That is to say, anything in an 8 bit color depth has a palette.

Basically, the palette is a list of colors in which the values for all three channels are defined. In an 8 bit palette, there are 256 of these colors. Once these are defined, the data in the image itself is simply a reference to the colors in the palette. By doing this, one can specify a color in only 8 bits, rather than 16 or 24, as it would be without the palette. That is to say, when reading in the image data, if you find the number 45, that means the color that goes there is whatever color is 45th in the palette.

If you still don''t get it, try tampering around with some paint programs in less than 16 bit color depths.

-Arek the Absolute
-Arek the Absolute"The full quartet is pirates, ninjas, zombies, and robots. Create a game which involves all four, and you risk being blinded by the sheer level of coolness involved." - Superpig

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.