class_docstr: A palette that varies the hue of the colors along a scale.
  
  Colors in a rainbow palette all have the same saturation, value and
  alpha components, while the hue is varied between two given extremes
  linearly. This palette has the advantage that it wraps around nicely
  if the hue is varied between zero and one (which is the default).
  
  Example:
  
      >>> pal = RainbowPalette(n=120)
      >>> pal.get(0)
      (1.0, 0.0, 0.0, 1.0)
      >>> pal.get(20)
      (1.0, 1.0, 0.0, 1.0)
      >>> pal.get(40)
      (0.0, 1.0, 0.0, 1.0)
      >>> pal = RainbowPalette(n=120, s=1, v=0.5, alpha=0.75)
      >>> pal.get(60)
      (0.0, 0.5, 0.5, 0.75)
      >>> pal.get(80)
      (0.0, 0.0, 0.5, 0.75)
      >>> pal.get(100)
      (0.5, 0.0, 0.5, 0.75)
      >>> pal = RainbowPalette(n=120)
      >>> pal2 = RainbowPalette(n=120, start=0.5, end=0.5)
      >>> pal.get(60) == pal2.get(0)
      True
      >>> pal.get(90) == pal2.get(30)
      True
  
  This palette was modeled after the C{rainbow} command of R.
class_docstr_tok: ["A","palette","that","varies","the","hue","of","the","colors","along","a","scale",".","Colors","in","a","rainbow","palette","all","have","the","same","saturation",",","value","and","alpha","components",",","while","the","hue","is","varied","between","two","given","extremes","linearly",".","This","palette","has","the","advantage","that","it","wraps","around","nicely","if","the","hue","is","varied","between","zero","and","one","(","which","is","the","default",")",".","Example",":",">",">",">","pal","=","RainbowPalette","(","n=120",")",">",">",">","pal.get","(","0",")","(","1.0",",","0.0",",","0.0",",","1.0",")",">",">",">","pal.get","(","20",")","(","1.0",",","1.0",",","0.0",",","1.0",")",">",">",">","pal.get","(","40",")","(","0.0",",","1.0",",","0.0",",","1.0",")",">",">",">","pal","=","RainbowPalette","(","n=120",",","s=1",",","v=0.5",",","alpha=0.75",")",">",">",">","pal.get","(","60",")","(","0.0",",","0.5",",","0.5",",","0.75",")",">",">",">","pal.get","(","80",")","(","0.0",",","0.0",",","0.5",",","0.75",")",">",">",">","pal.get","(","100",")","(","0.5",",","0.0",",","0.5",",","0.75",")",">",">",">","pal","=","RainbowPalette","(","n=120",")",">",">",">","pal2","=","RainbowPalette","(","n=120",",","start=0.5",",","end=0.5",")",">",">",">","pal.get","(","60",")","==","pal2.get","(","0",")","True",">",">",">","pal.get","(","90",")","==","pal2.get","(","30",")","True","This","palette","was","modeled","after","the","C","{","rainbow","}","command","of","R","."]
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"""
      return hsva_to_rgba(
          self._start + v * self._dh, self._s, self._v, self._alpha
      )
  
imports: from abc import ABCMeta, abstractmethod
  from math import ceil
label_desc: Use image node_id 2 for calling the RainbowPalette obj's underlying member method code with example usage: obj._get(v) and returns: hsva_to_rgba