1SDL_Palette(3) SDL API Reference SDL_Palette(3)
2
3
4
6 SDL_Palette - Color palette for 8-bit pixel formats
7
9 typedef struct{
10 int ncolors;
11 SDL_Color *colors;
12 } SDL_Palette;
13
15 ncolors Number of colors used in this palette
16
17 colors Pointer to SDL_Color structures that make up the
18 palette.
19
21 Each pixel in an 8-bit surface is an index into the colors field of the
22 SDL_Palette structure store in SDL_PixelFormat. A SDL_Palette should
23 never need to be created manually. It is automatically created when SDL
24 allocates a SDL_PixelFormat for a surface. The colors values of a
25 SDL_Surfaces palette can be set with the SDL_SetColors.
26
28 SDL_Color, SDL_Surface, SDL_SetColors SDL_SetPalette
29
30
31
32SDL Tue 11 Sep 2001, 23:01 SDL_Palette(3)