SetLayerPalette(id, palid[, t])
id with the palette specified by
palid. The optional table argument t allows you to specify some further options.
The following tags are currently supported by the optional table argument t:
Remap:True, the pixels of the layer will be remapped to
match the colors of the new palette as closely as possible. By default,
there will be no remapping and the actual pixel data of the layer
will remain untouched. If you want remapping, set this tag to True but
be warned that remapping all pixels will of course take much more time than
just setting a new palette without remapping. Defaults to False.
Dither:Remap tag (see above) has been set to True, you can use the Dither
tag to specify whether or not dithering should be used. Defaults to True which
means dithering should be used.
CopyCycleTable:True, this cycle table will be copied to the layer as well.
Defaults to False.
You need to enable layers before you can use this function. See Layers introduction for details.