class_docstr: Advanced gradient that consists of more than two base colors.
  
  Example:
  
    >>> pal = AdvancedGradientPalette(["red", "black", "blue"], n=9)
    >>> pal.get(2)
    (0.5, 0.0, 0.0, 1.0)
    >>> pal.get(7)
    (0.0, 0.0, 0.75, 1.0)
class_docstr_tok: ["Advanced","gradient","that","consists","of","more","than","two","base","colors",".","Example",":",">",">",">","pal","=","AdvancedGradientPalette","(","[","``","red","''",",","``","black","''",",","``","blue","''","]",",","n=9",")",">",">",">","pal.get","(","2",")","(","0.5",",","0.0",",","0.0",",","1.0",")",">",">",">","pal.get","(","7",")","(","0.0",",","0.0",",","0.75",",","1.0",")"]
docstr: Returns the color corresponding to the given color index.
  
  @param v: numerical index of the color to be retrieved
  @return: a 4-tuple containing the RGBA values
docstr_tok: ["Returns","the","color","corresponding","to","the","given","color","index",".","@","param","v",":","numerical","index","of","the","color","to","be","retrieved","@","return",":","a","4-tuple","containing","the","RGBA","values"]
code: def _get(self, v):
      """Returns the color corresponding to the given color index.
  
      @param v: numerical index of the color to be retrieved
      @return: a 4-tuple containing the RGBA values"""
      colors = self._colors
      for i in range(len(self._indices) - 1):
          if self._indices[i] <= v and self._indices[i + 1] >= v:
              dist = self._dists[i]
              ratio = float(v - self._indices[i]) / dist
              return tuple(
                  [
                      colors[i][x] * (1 - ratio)
                      + colors[i + 1][x] * ratio
                      for x in range(4)
                  ]
              )
      return (0.0, 0.0, 0.0, 1.0)
  
imports: from abc import ABCMeta, abstractmethod
  from math import ceil
label_desc: Use image node_id 2 for calling the AdvancedGradientPalette obj's underlying member method code with example usage: obj._get(v) and returns: int,  int,  int,  int, tuple