A structure that contains palette information.
int |
ncolors |
the number of colors in the palette |
colors |
an array of SDL_Color structures representing the palette |
|
Uint32 |
version |
incrementally tracks changes to the palette (internal use) |
int |
refcount |
reference count (internal use) |
Each pixel in an 8-bit surface is an index into the colors field of the SDL_Palette structure stored in SDL_PixelFormat. An SDL_Palette should never need to be created manually. It is automatically created when SDL allocates an SDL_PixelFormat for a surface. The colors values of an SDL_Surface's palette can be set with SDL_SetPaletteColors().