chickadee » sdl2 » palette-colours-set!

palette-colors paletteprocedure
palette-colours paletteprocedure
set! (palette-colors palette) colors-vecsetter
set! (palette-colours palette) colors-vecsetter
palette-colors-set! colors-vec #!optional firstcolorsetter
palette-colours-set! colors-vec #!optional firstcolorsetter

palette-colors and palette-colours return copies of all colors in the palette, as a Scheme vector of managed sdl2:colors.

The setters set multiple colors in the palette to copies of the given colors. See SDL_SetPaletteColors.

colors-vec must be a Scheme vector of sdl2:colors.

firstcolor specifies the first index of the palette to set. I.e., palette index firstcolor will be set to the first color in colors-vec, palette index firstcolor + 1 will be set to the second color, and so on. firstcolor defaults to 0. Signals an exception of kind (exn bounds) if firstcolor is out of bounds.

The set! form cannot accept the firstcolor argument.

The setters return #t if every color in colors-vec was used, or #f if some colors were not used, e.g. because there were more colors in the vector than could fit in the palette.