=pod =head1 NAME SDL::Palette -- Color palette for 8-bit pixel formats =head1 CATEGORY Core, Video, Structure =head1 DESCRIPTION Each pixel in an 8-bit surface is an index into the colors field of the C object stored in its C. A C is created automatically when SDL allocates a C for a surface. This class has methods for returning the colors in a palette object. The colors can be set with L and L. =head1 METHODS =head2 ncolors $ncolors = $palette->ncolors(); Returns the number of colors in palette. =head2 colors @colors = @{ $palette->colors() }; Returns an array, C in length, of the Ls in the palette. =head2 color_index $color = $palette->color_index( $index ); Returns the L at the provided index of the palette. =head1 SEE ALSO L L L L =head1 AUTHORS See L. =cut