# Gimp.Palette.prototype.set_colormap

    function set_colormap(format: Babl.Object, colormap: Number(guint8), num_bytes: Number(gsize)): Boolean {
        // Gjs wrapper for gimp_palette_set_colormap()
    }

This procedure sets the entries in the specified palette in one go, though they must all be in the same format.

The number of entries depens on the num_bytes size of colormap and the bytes-per-pixel size of format. The procedure will fail if num_bytes is not an exact multiple of the number of bytes per pixel of format.

Since 3.0

format

  The desired color format. colormap (array length=num_bytes): The new colormap values.

colormap
num_bytes

  The byte-size of colormap.

Returns

  true on success.