def hsl2rgb(H,S,L):
    H = H/360.0
    S = S/100.0 # Turn into a percentage
    L = L/100.0
    if (S == 0):
        return (int(L*255), int(L*255), int(L*255))
    var_2 = L * (1+S) if (L < 0.5) else (L+S) - (S*L)
    var_1 = 2*L - var_2

    def hue2rgb(v1, v2, vH):
        if (vH < 0): vH += 1
        if (vH > 1): vH -= 1
        if ((6*vH)<1): return v1 + (v2-v1)*6*vH
        if (1 < (2*vH)): return v2
        if ((3*vH)<2): return v1 + (v2-v1)*(2/3.0-vH)*6
        return v1
        
    R = int(255*hue2rgb(var_1, var_2, H + (1.0/3)))
    G = int(255*hue2rgb(var_1, var_2, H))
    B = int(255*hue2rgb(var_1, var_2, H - (1.0/3)))
    return (R,G,B)
dataset/ETHPy150Open twoolie/NBT/examples/map.py/hsl2rgb/swapped operands of `<`