def xyz_to_lab(x, y=None, z=None, wref=_DEFAULT_WREF):
if type(x) in [list,tuple]:<EOL><INDENT>x, y, z = x<EOL><DEDENT>x /= wref[<NUM_LIT:0>]<EOL>y /= wref[<NUM_LIT:1>]<EOL>z /= wref[<NUM_LIT:2>]<EOL>x, y, z = [((v > <NUM_LIT>) and [v**_oneThird] or [(<NUM_LIT> * v) + _sixteenHundredsixteenth])[<NUM_LIT:0>] for v in (x, y, z)]<EOL>l = (<NUM_LIT> * y) - <NUM_LIT:16><EOL>a = <NUM_LIT> * (x - y)<EOL>b = <NUM_LIT> * (y - z)<EOL>return (l, a, b)<EOL>
Convert the color from CIE XYZ to CIE L*a*b*.

    Parameters:
      :x:
        The X component value [0...1]
      :y:
        The Y component value [0...1]
      :z:
        The Z component value [0...1]
      :wref:
        The whitepoint reference, default is 2° D65.

    Returns:
      The color as an (L, a, b) tuple in the range:
      L[0...100],
      a[-1...1],
      b[-1...1]

    >>> '(%g, %g, %g)' % xyz_to_lab(0.488941, 0.365682, 0.0448137)
    '(66.9518, 0.430841, 0.739692)'

    >>> '(%g, %g, %g)' % xyz_to_lab(0.488941, 0.365682, 0.0448137, WHITE_REFERENCE['std_D50'])
    '(66.9518, 0.41166, 0.67282)'