colour.XYZ_to_Hunter_Lab#

colour.XYZ_to_Hunter_Lab(XYZ: ArrayLike, XYZ_n: ArrayLike = TVS_ILLUMINANTS_HUNTERLAB['CIE 1931 2 Degree Standard Observer']['D65'].XYZ_n, K_ab: ArrayLike = TVS_ILLUMINANTS_HUNTERLAB['CIE 1931 2 Degree Standard Observer']['D65'].K_ab) NDArrayFloat[source]#

Convert from CIE XYZ tristimulus values to Hunter L,a,b colour scale.

Parameters:
  • XYZ (ArrayLike) – CIE XYZ tristimulus values.

  • XYZ_n (ArrayLike) – Reference illuminant tristimulus values.

  • K_ab (ArrayLike) – Reference illuminant chromaticity coefficients, if K_ab is set to None it will be computed using colour.XYZ_to_K_ab_HunterLab1966().

Returns:

Hunter L,a,b colour scale array.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

XYZ_n

[0, 100]

[0, 1]

Range

Scale - Reference

Scale - 1

Lab

L : [0, 100]

a : [-100, 100]

b : [-100, 100]

L : [0, 1]

a : [-1, 1]

b : [-1, 1]

References

[HunterLab08a]

Examples

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) * 100
>>> D65 = TVS_ILLUMINANTS_HUNTERLAB["CIE 1931 2 Degree Standard Observer"]["D65"]
>>> XYZ_to_Hunter_Lab(XYZ, D65.XYZ_n, D65.K_ab)  
array([ 34.9245257...,  47.0618985...,  14.3861510...])