Gimp.Palette.prototype.get_colormap

function get_colormap(format: Babl.Object): [return_value: ByteArray, num_colors: Number(gint), num_bytes: Number(gsize)] {
    // Gjs wrapper for gimp_palette_get_colormap()
}
  

This procedure returns a palette's colormap as an array of bytes with all colors converted to a given Babl format.

The byte-size of the returned colormap depends on the number of colors and on the bytes-per-pixel size of format. E.g. that the following equality is ensured:

```C num_bytes == num_colors * babl_format_get_bytes_per_pixel (format) ```

Therefore num_colors and num_bytes are kinda redundant since both indicate the size of the return value in a different way. You may both set them to null but not at the same time.

Since 3.0

format

The desired color format.

return_value

The palette's colormap.

num_colors

The number of colors in the palette.

num_bytes

The byte-size of the returned value.