code: def hsv_to_rgb(hsv):
      
      # Algorithm adapted from http://www.cs.rit.edu/~ncs/color/t_convert.html
      h, s, v = hsv
      if s == 0:
          return (v, v, v)
      h /= 60.0
      i = math.floor(h)
      f = h-i
      p = v*(1.0-s)
      q = v*(1.0-s*f)
      t = v*(1.0-s*(1.0-f))
      if i == 0:
          return (v, t, p)
      elif i == 1:
          return (q, v, p)
      elif i == 2:
          return (p, v, t)
      elif i == 3:
          return (p, q, v)
      elif i == 4:
          return (t, p, v)
      else:
          return (v, p, q)
docs: Converts a tuple of hue, saturation, value to a tuple of red, green blue.
      Hue should be an angle from 0.0 to 359.0.  Saturation and value should be a
      value from 0.0 to 1.0, where saturation controls the intensity of the hue and
      value controls the brightness.