colour.adaptation.chromatic_adaptation_Zhai2018(XYZ_b, XYZ_wb, XYZ_wd, D_b=1, D_d=1, XYZ_wo=array([100, 100, 100]), chromatic_adaptation_transform='CAT02')[source]

Adapts given sample colour \(XYZ_{\beta}\) tristimulus values from input viewing conditions under \(\beta\) illuminant to output viewing conditions under \(\delta\) illuminant using Zhai and Luo (2018) chromatic adaptation model.

According to the definition of \(D\), a one-step CAT such as CAT02 can only be used to transform colors from an incomplete adapted field into a complete adapted field. When CAT02 are used to transform an incomplete to incomplete case, \(D\) has no baseline level to refer to. Smet et al. (2017) proposed a new concept of two-step CAT to replace the present CATs such as CAT02 with only one-step transform in order to define \(D\) more clearly. A two-step CAT involves an illuminant representing the baseline states between the test and reference illuminants for the calculation. In the first step the test color is transformed from test illuminant to the baseline illuminant (\(BI\)), and it is then transformed to the reference illuminant Degrees of adaptation under the other illuminants should be calculated relative to the adaptation under the \(BI\). When \(D\) becomes lower towards zero, the adaptation point of the observer moves towards the \(BI\). Therefore, the chromaticity of the \(BI\) should be an intrinsic property of the human vision system.

  • XYZ_b (array_like) – Sample colour \(XYZ_{\beta}\) under input illuminant \(\beta\).

  • XYZ_wb (array_like) – Input illuminant \(\beta\).

  • XYZ_wd (array_like) – Output illuminant \(\delta\).

  • D_b (numeric, optional) – Degree of adaptation \(D_{\beta}\) of input illuminant \(\beta\).

  • D_d (numeric, optional) – Degree of adaptation \(D_{\delta}\) of output illuminant \(\delta\).

  • XYZ_wo (array_like, optional) – Baseline illuminant (\(BI\)) \(o\).

  • chromatic_adaptation_transform (str, optional) – {‘CAT02’, ‘CAT16’}, Chromatic adaptation transform.


Sample corresponding colour \(XYZ_{\delta}\) tristimulus values under output illuminant \(D_{\delta}\).

Return type



>>> XYZ_b = np.array([48.900, 43.620, 6.250])
>>> XYZ_wb = np.array([109.850, 100, 35.585])
>>> XYZ_wd = np.array([95.047, 100, 108.883])
>>> D_b = 0.9407
>>> D_d = 0.9800
>>> XYZ_wo = np.array([100, 100, 100])
>>> chromatic_adaptation_Zhai2018(
...     XYZ_b, XYZ_wb, XYZ_wd, D_b, D_d, XYZ_wo)  
array([ 39.1856164...,  42.1546179...,  19.2367203...])
>>> XYZ_d = np.array([39.18561644, 42.15461798, 19.23672036])
>>> chromatic_adaptation_Zhai2018(
...     XYZ_d, XYZ_wd, XYZ_wb, D_d, D_b, XYZ_wo)  
array([ 48.9 ,  43.62,   6.25])