globalmapper.SetLayerPalette ============================ .. currentmodule:: globalmapper .. py:function:: SetLayerPalette (GM_LayerHandle_t32 aLayer, GM_PaletteEntry_t aNewPalette, int aReserved) -> GM_Error_t32 Sets the color palette for a given layer. The layer must be a palette-based image. The *mPalette* and *mPaletteSize* values in GM_LayerInfo_t for the layer will indicate the size and values in the current palette. You can restore the original palette for a layer by passing None. If you pass in fewer colors than in the original palette, only those colors that you provide will be updated. :param GM_LayerHandle_t32 aLayer: layer to set palette for :param GM_PaletteEntry_t aNewPalette: pointer to list of palette entries to use for layer or None to reset palette to original palette :param int aReserved: Reserved for future use; must be 0. :returns: Error Code :rtype: GM_Error_t32