set_palette method

set_palette

Sets the image palette.

def set_palette(self, palette, update_colors):
    ...
ParameterTypeDescription
paletteIColorPaletteThe palette to set.
update_colorsboolif set to true colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.

See Also