code: def makePalette(color1, color2, N, hsv=True):
      
      if hsv:
          color1 = rgb2hsv(color1)
          color2 = rgb2hsv(color2)
      c1 = np.array(getColor(color1))
      c2 = np.array(getColor(color2))
      cols = []
      for f in np.linspace(0, 1, N - 1, endpoint=True):
          c = c1 * (1 - f) + c2 * f
          if hsv:
              c = np.array(hsv2rgb(c))
          cols.append(c)
      return cols
docs: Generate N colors starting from `color1` to `color2`
      by linear interpolation HSV in or RGB spaces.
  
      :param int N: number of output colors.
      :param color1: first rgb color.
      :param color2: second rgb color.
      :param bool hsv: if `False`, interpolation is calculated in RGB space.
  
      .. hint:: Example: |colorpalette.py|_