class_docstr: Color palette for palette mapped images
  
  :param mode: The mode to use for the palette. See:
      :ref:`concept-modes`. Defaults to "RGB"
  :param palette: An optional palette. If given, it must be a bytearray,
      an array or a list of ints between 0-255. The list must consist of
      all channels for one color followed by the next color (e.g. RGBRGBRGB).
      Defaults to an empty palette.
code: def __init__(self, mode="RGB", palette=None):
      self.mode = mode
      self.rawmode = None  # if set, palette contains raw data
      self.palette = palette or bytearray()
      self.dirty = None
  
imports: from __future__ import annotations
  import array
  from .None import GimpGradientFile, GimpPaletteFile, ImageColor, PaletteFile
label_desc: Use image node_id 1 to create a new ImagePalette object  with example: obj = ImagePalette(mode, palette)