SDL_Palette.ncolors

< number of elements in colors.

struct SDL_Palette
int ncolors;

Meta