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 and of length ``size``
      times the number of colors in ``mode``. The list must be aligned
      by channel (All R values must be contiguous in the list before G
      and B values.) Defaults to 0 through 255 per channel.
  :param size: An optional palette size. If given, it cannot be equal to
      or greater than 256. Defaults to 0.
class_docstr_tok: ["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","and","of","length","``","size","``","times","the","number","of","colors","in","``","mode","``",".","The","list","must","be","aligned","by","channel","(","All","R","values","must","be","contiguous","in","the","list","before","G","and","B","values",".",")","Defaults","to","0","through","255","per","channel",".",":","param","size",":","An","optional","palette","size",".","If","given",",","it","can","not","be","equal","to","or","greater","than","256",".","Defaults","to","0","."]
docstr: Get palette contents in format suitable for the low-level
  ``im.putpalette`` primitive.
  
  .. warning:: This method is experimental.
docstr_tok: ["Get","palette","contents","in","format","suitable","for","the","low-level","``","im.putpalette","``","primitive",".","..","warning",":",":","This","method","is","experimental","."]
code: def getdata(self):
      """
      Get palette contents in format suitable for the low-level
      ``im.putpalette`` primitive.
  
      .. warning:: This method is experimental.
      """
      if self.rawmode:
          return self.rawmode, self.palette
      return self.mode + ";L", self.tobytes()
  
file_path: catboost/contrib/python/Pillow/py2/PIL/ImagePalette.py
imports: import array
  from .None import GimpGradientFile, GimpPaletteFile, ImageColor, PaletteFile
label_desc: Use image node_id 3 for calling the ImagePalette obj's underlying member method code with example usage: obj.getdata() and returns: unknown,  self, self,  self