# Gimp.Image.set_palette

    @accepts(Gimp.Image, Gimp.Palette)
    @returns(Gimp.Palette)
    def set_palette(self, new_palette):
        # Python wrapper for gimp_image_set_palette()

Set the image's colormap to a copy of @palette

This procedure changes the image's colormap to an exact copy of @palette and returns the palette of self. If the image is not in Indexed color mode, nothing happens and None is returned.

Since 3.0

self

  The image.

new_palette

  The palette to copy from.

Returns