colour.XYZ_to_hdr_CIELab

colour.XYZ_to_hdr_CIELab(XYZ, illuminant=array([ 0.3127, 0.329 ]), Y_s=0.2, Y_abs=100, method='Fairchild 2011')[source]

Converts from CIE XYZ tristimulus values to hdr-CIELAB colourspace.

Parameters
  • XYZ (array_like) – CIE XYZ tristimulus values.

  • illuminant (array_like, optional) – Reference illuminant CIE xy chromaticity coordinates or CIE xyY colourspace array.

  • Y_s (numeric or array_like) – Relative luminance \(Y_s\) of the surround.

  • Y_abs (numeric or array_like) – Absolute luminance \(Y_{abs}\) of the scene diffuse white in \(cd/m^2\).

  • method (unicode, optional) – {‘Fairchild 2011’, ‘Fairchild 2010’}, Computation method.

Returns

hdr-CIELAB colourspace array.

Return type

ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ

[0, 1]

[0, 1]

illuminant

[0, 1]

[0, 1]

Y_s

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

Lab_hdr

L_hdr : [0, 100]

a_hdr : [-100, 100]

b_hdr : [-100, 100]

L_hdr : [0, 1]

a_hdr : [-1, 1]

b_hdr : [-1, 1]

  • Conversion to polar coordinates to compute the chroma \(C_{hdr}\) and hue \(h_{hdr}\) correlates can be safely performed with colour.Lab_to_LCHab() definition.

  • Conversion to cartesian coordinates from the Lightness \(L_{hdr}\), chroma \(C_{hdr}\) and hue \(h_{hdr}\) correlates can be safely performed with colour.LCHab_to_Lab() definition.

References

[FW10], [FC11]

Examples

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_to_hdr_CIELab(XYZ)  
array([ 51.8700206...,  60.4763385...,  32.1455191...])
>>> XYZ_to_hdr_CIELab(XYZ, method='Fairchild 2010')  
array([  31.9962111...,  128.0076303...,   48.7695230...])