def hsl_to_rgb(h, s, l):
    """
    convert hsl([0-359] deg, [0-1] float, [0-1] float) into
    rgb([0-255] int, [0-255] int, [0-255] int)
    """
    c = (2 - 2 * l) * s if l > 0.5 else 2 * l
    y = (h / 60) % 2
    x = (2 - y) * c if y > 1.0 else y
    m = l - c / 2
    rp = c if h < 60 or h >= 300 else x if h < 120 or h >= 240 else 0
    gp = c if h >= 60 and h < 180 else x if h < 240 else 0
    bp = c if h >= 180 and h < 300 else x if h >= 120 else 0
    return [int((rp + m) * 255), int((gp + m) * 255), int((bp + m) * 255)]