def hsl_to_rgb(h, s=None, l=None):
if type(h) in [list,tuple]:<EOL><INDENT>h, s, l = h<EOL><DEDENT>if s==<NUM_LIT:0>: return (l, l, l)   <EOL>if l<<NUM_LIT:0.5>: n2 = l * (<NUM_LIT:1.0> + s)<EOL>else: n2 = l+s - (l*s)<EOL>n1 = (<NUM_LIT> * l) - n2<EOL>h /= <NUM_LIT><EOL>hueToRgb = _hue_to_rgb<EOL>r = hueToRgb(n1, n2, h + <NUM_LIT:2>)<EOL>g = hueToRgb(n1, n2, h)<EOL>b = hueToRgb(n1, n2, h - <NUM_LIT:2>)<EOL>return (r, g, b)<EOL>
Convert the color from HSL coordinates to RGB.

    Parameters:
      :h:
        The Hue component value [0...1]
      :s:
        The Saturation component value [0...1]
      :l:
        The Lightness component value [0...1]

    Returns:
      The color as an (r, g, b) tuple in the range:
      r[0...1],
      g[0...1],
      b[0...1]

    >>> hsl_to_rgb(30.0, 1.0, 0.5)
    (1.0, 0.5, 0.0)