SDL_SetPaletteColors - Man Page

Set a range of colors in a palette.

Synopsis

#include <SDL3/SDL_pixels.h>

bool SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors);

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.

Return Value

for more information.

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.

Availability

This function is available since SDL 3.2.0.

Referenced By

SDL_CreatePalette(3), SDL_CreateSurfacePalette(3), SDL_Palette.3type(3).

SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS