colour.XYZ_to_hdr_CIELab¶
- colour.XYZ_to_hdr_CIELab(XYZ: ArrayLike, illuminant: ArrayLike = CCS_ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65'], Y_s: FloatingOrArrayLike = 0.2, Y_abs: FloatingOrArrayLike = 100, method: Union[Literal['Fairchild 2011', 'Fairchild 2010'], str] = 'Fairchild 2011') numpy.ndarray [source]¶
Convert from CIE XYZ tristimulus values to hdr-CIELAB colourspace.
- Parameters
XYZ (ArrayLike) – CIE XYZ tristimulus values.
illuminant (ArrayLike) – Reference illuminant CIE xy chromaticity coordinates or CIE xyY colourspace array.
Y_s (FloatingOrArrayLike) – Relative luminance \(Y_s\) of the surround.
Y_abs (FloatingOrArrayLike) – Absolute luminance \(Y_{abs}\) of the scene diffuse white in \(cd/m^2\).
method (Union[Literal['Fairchild 2011', 'Fairchild 2010'], str]) – Computation method.
- Returns
hdr-CIELAB colourspace array.
- Return type
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
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...])