colour.models.hunter_rdab Module¶
Hunter Rd,a,b Colour Scale¶
Defines the Hunter Rd,a,b colour scale transformations:
References
[1] | HunterLab. (2012). Hunter Rd,a,b Color Scale – History and Application. Retrieved from https://hunterlabdotcom.files.wordpress.com/2012/07/an-1016-hunter-rd-a-b-color-scale-update-12-07-03.pdf |
-
colour.models.hunter_rdab.
XYZ_to_Hunter_Rdab
(XYZ, XYZ_n=(96.38, 100.0, 82.45), K_ab=(173.51, 58.48))[source]¶ Converts from CIE XYZ tristimulus values to Hunter Rd,a,b colour scale.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values.
- XYZ_n (array_like, optional) – Reference illuminant tristimulus values.
- K_ab (array_like, optional) – Reference illuminant chromaticity coefficients, if K_ab is set to
None it will be computed using
XYZ_to_K_ab_HunterLab1966()
.
Returns: Hunter Rd,a,b colour scale array.
Return type: ndarray
Notes
- Input CIE XYZ and reference illuminant tristimulus values are in domain [0, 100].
Examples
>>> import numpy as np >>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) * 100 >>> D50 = HUNTERLAB_ILLUMINANTS.get( ... 'CIE 1931 2 Degree Standard Observer').get('D50') >>> XYZ_to_Hunter_Rdab( ... XYZ, ... D50.XYZ_n, ... D50.K_ab) array([ 10.08 , -18.6765376..., -3.4432992...])