SDL_SetPaletteColors - Set a range of colors in a palette.
Contents
Availability
This function is available since SDL 3.2.0.
Simple Directmedia Layer SDL 3.2.10 SDL_SetPaletteColors(3)
Function Parameters
palette
the SDL_Palette
structure to modify.
colors an array of SDL_Color
structures to copy into the palette.
firstcolor
the index of the first palette entry to modify.
ncolors
the number of entries to modify.
Header File
Defined in SDL3/SDL_pixels.h
Name
SDL_SetPaletteColors - Set a range of colors in a palette.
Return Value
Returns true on success or false on failure; call
SDL_GetError () for more information.
Synopsis
#include"SDL3/SDL.h"boolSDL_SetPaletteColors(SDL_Palette*palette,constSDL_Color*colors,intfirstcolor,intncolors);
Thread Safety
It is safe to call this function from any thread, as long as the palette is not modified or destroyed in
another thread.
