Gimp.Palette.set_colormap

### Method

# Gimp Paletteset_colormap

since: 3.0

#### Declaration [src]

    gboolean
    gimp_palette_set_colormap (
      GimpPalette* palette,
      const Babl* format,
      guint8* colormap,
      gsize num_bytes
    )

#### Description [src]

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`.

Available since: 3.0

#### Parameters

`format`

  Type: `Babl`

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

  The data is owned by the caller of the method.

`colormap`

  Type: `guint8*`

  No description available.

  The data is owned by the caller of the method.

`num_bytes`

  Type: `gsize`

  The byte-size of `colormap`.

#### Return value

Type: `gboolean`

`TRUE` on success.