Gimp.Palette.get_colormap

@accepts(Gimp.Palette, Babl.Object, int, gsize)
@returns([guint8])
def get_colormap(self, format, num_colors, num_bytes):
    # Python 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 None but not at the same time.

Since 3.0

self

The palette.

format

The desired color format.

num_colors

The number of colors in the palette.

num_bytes

The byte-size of the returned value.

Returns