colour.chromatic_adaptation#

colour.chromatic_adaptation(XYZ: ArrayLike, XYZ_w: ArrayLike, XYZ_wr: ArrayLike, method: Literal['CIE 1994', 'CMCCAT2000', 'Fairchild 1990', 'Li 2025', 'Von Kries', 'Zhai 2018', 'vK20'] | str = 'Von Kries', **kwargs: Any) NDArrayFloat[source]#

Adapt the specified stimulus CIE XYZ tristimulus values from test viewing conditions to reference viewing conditions using the specified chromatic adaptation method.

Parameters:
Returns:

CIE XYZ tristimulus values of the stimulus corresponding colour.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ

1

1

XYZ_w

1

1

XYZ_wr

1

1

XYZ_wo

1

1

Y_o

1

1

Range

Scale - Reference

Scale - 1

XYZ_c

1

1

References

[CIET13294], [Fai91], [Fai13f], [Fai13a], [LLRH02], [Li25], [WRC12d]

Examples

Von Kries chromatic adaptation:

>>> import numpy as np
>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_w = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460])
>>> chromatic_adaptation(XYZ, XYZ_w, XYZ_wr)
...
array([0.2163881..., 0.1257    , 0.0384749...])

vK2020 chromatic adaptation:

>>> XYZ_w = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460])
>>> chromatic_adaptation(XYZ, XYZ_w, XYZ_wr, method="vK20")
...
array([0.2146884..., 0.1245616..., 0.0466255...])

CIE 1994 chromatic adaptation, requires extra kwargs:

>>> XYZ = np.array([0.2800, 0.2126, 0.0527])
>>> XYZ_w = np.array([1.09867452, 1.00000000, 0.35591556])
>>> XYZ_wr = np.array([0.95045593, 1.00000000, 1.08905775])
>>> Y_o = 0.20
>>> E_o = 1000
>>> chromatic_adaptation(
...     XYZ, XYZ_w, XYZ_wr, method="CIE 1994", Y_o=Y_o, E_o1=E_o, E_o2=E_o
... )
...
array([0.2403379..., 0.2115621..., 0.1764301...])

CMCCAT2000 chromatic adaptation, requires extra kwargs:

>>> XYZ = np.array([0.2248, 0.2274, 0.0854])
>>> XYZ_w = np.array([1.1115, 1.0000, 0.3520])
>>> XYZ_wr = np.array([0.9481, 1.0000, 1.0730])
>>> L_A = 200
>>> chromatic_adaptation(
...     XYZ, XYZ_w, XYZ_wr, method="CMCCAT2000", L_A1=L_A, L_A2=L_A
... )
...
array([0.1952698..., 0.2306834..., 0.2497175...])

Fairchild (1990) chromatic adaptation, requires extra kwargs:

>>> XYZ = np.array([0.1953, 0.2307, 0.2497])
>>> Y_n = 200
>>> chromatic_adaptation(XYZ, XYZ_w, XYZ_wr, method="Fairchild 1990", Y_n=Y_n)
...
array([0.2332526..., 0.2332455..., 0.7611593...])

Li (2025) chromatic adaptation:

>>> XYZ = np.array([0.1953, 0.2307, 0.2497])
>>> L_A = 64
>>> F_surround = 1.0
>>> chromatic_adaptation(
...     XYZ, XYZ_w, XYZ_wr, method="Li 2025", L_A=L_A, F_surround=F_surround
... )
...
array([0.2039701..., 0.2304747..., 0.6783065...])

Zhai and Luo (2018) chromatic adaptation:

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_w = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460])
>>> chromatic_adaptation(XYZ, XYZ_w, XYZ_wr, method="Zhai 2018")
...
array([0.2163881..., 0.1257    , 0.0384749...])
>>> chromatic_adaptation(
...     XYZ,
...     XYZ_w,
...     XYZ_wr,
...     method="Zhai 2018",
...     D_b=0.9,
...     XYZ_wo=np.array([100, 100, 100]),
... )
...
array([0.2152436..., 0.1253522..., 0.0388406...])