colour.XYZ_to_Hunter_Rdab#

colour.XYZ_to_Hunter_Rdab(XYZ: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100], XYZ_n: TypeAliasForwardRef('ArrayLike') | None = None, K_ab: TypeAliasForwardRef('ArrayLike') | None = None) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 100][source]#

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

Parameters:
  • XYZ (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100]) – CIE XYZ tristimulus values.

  • XYZ_n (TypeAliasForwardRef('ArrayLike') | None) – Reference illuminant tristimulus values.

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

Returns:

Hunter Rd,a,b colour scale array.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ

100

1

XYZ_n

100

1

Range

Scale - Reference

Scale - 1

R_d_ab

100

1

References

[HunterLab12]

Examples

>>> import numpy as np
>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) * 100
>>> D65 = TVS_ILLUMINANTS_HUNTERLAB["CIE 1931 2 Degree Standard Observer"]["D65"]
>>> XYZ_to_Hunter_Rdab(XYZ, D65.XYZ_n, D65.K_ab)
...
array([ 12.197225 ...,  57.1253787...,  17.4624134...])