# Gimp.Image.prototype.set_palette

    function set_palette(new_palette: Gimp.Palette): Gimp.Palette {
        // Gjs 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 image. If the image is not in Indexed color mode, nothing happens and null is returned.

Since 3.0

new_palette

  The palette to copy from.

Returns

  The image's colormap palette.