def lab_to_rgb(l, a, b):
y = (l + <NUM_LIT:16>) / <NUM_LIT><EOL>x = a / <NUM_LIT> + y<EOL>z = y - b / <NUM_LIT><EOL>v = [x, y, z]<EOL>for i in _range(<NUM_LIT:3>):<EOL><INDENT>if pow(v[i], <NUM_LIT:3>) > <NUM_LIT>:<EOL><INDENT>v[i] = pow(v[i], <NUM_LIT:3>)<EOL><DEDENT>else:<EOL><INDENT>v[i] = (v[i] - <NUM_LIT:16> / <NUM_LIT>) / <NUM_LIT><EOL><DEDENT><DEDENT>x = v[<NUM_LIT:0>] * <NUM_LIT> / <NUM_LIT:100><EOL>y = v[<NUM_LIT:1>] * <NUM_LIT> / <NUM_LIT:100><EOL>z = v[<NUM_LIT:2>] * <NUM_LIT> / <NUM_LIT:100><EOL>r = x * <NUM_LIT> + y * -<NUM_LIT> + z * -<NUM_LIT><EOL>g = x * -<NUM_LIT> + y * <NUM_LIT> + z * <NUM_LIT><EOL>b = x * <NUM_LIT> + y * -<NUM_LIT> + z * <NUM_LIT><EOL>v = [r, g, b]<EOL>for i in _range(<NUM_LIT:3>):<EOL><INDENT>if v[i] > <NUM_LIT>:<EOL><INDENT>v[i] = <NUM_LIT> * pow(v[i], <NUM_LIT:1> / <NUM_LIT>) - <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>v[i] = <NUM_LIT> * v[i]<EOL><DEDENT><DEDENT>r, g, b = v[<NUM_LIT:0>], v[<NUM_LIT:1>], v[<NUM_LIT:2>]<EOL>return r, g, b<EOL>
Converts CIE Lab to RGB components.

    First we have to convert to XYZ color space.
    Conversion involves using a white point,
    in this case D65 which represents daylight illumination.

    Algorithm adopted from:
    http://www.easyrgb.com/math.php