GimpUi.PreviewArea.prototype.set_colormap

function set_colormap(colormap: ByteArray, num_colors: Number(gint)): void {
    // Gjs wrapper for gimp_preview_area_set_colormap()
}
  

Sets the colormap for the GimpUi.PreviewArea widget. You need to call this function before you use GimpUi.PreviewArea.prototype.draw with an image type of Gimp.ImageType.indexed_image or Gimp.ImageType.indexeda_image.

Since GIMP 2.2

colormap

a #guchar buffer that contains the colormap

num_colors

the number of colors in the colormap