colour.adaptation.chromatic_adaptation_vK20#

colour.adaptation.chromatic_adaptation_vK20(XYZ: Domain1, XYZ_p: Domain1, XYZ_n: Domain1, XYZ_r: ArrayLike | None = None, transform: Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str = 'CAT02', coefficients: Coefficients_DegreeOfAdaptation_vK20 = CONDITIONS_DEGREE_OF_ADAPTATION_VK20['Fairchild']) Range1[source]#

Adapt the specified stimulus CIE XYZ tristimulus values from test viewing conditions to reference viewing conditions using the Von Kries 2020 (vK20) chromatic adaptation model.

Parameters:
  • XYZ (Domain1) – CIE XYZ tristimulus values of the stimulus to adapt.

  • XYZ_p (Domain1) – Previous viewing conditions CIE XYZ tristimulus values of the whitepoint.

  • XYZ_n (Domain1) – Adapting viewing conditions CIE XYZ tristimulus values of the whitepoint.

  • XYZ_r (ArrayLike | None) – Reference viewing conditions CIE XYZ tristimulus values of the whitepoint.

  • transform (Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str) – Chromatic adaptation transform.

  • coefficients (Coefficients_DegreeOfAdaptation_vK20) – vK20 degree of adaptation coefficients.

Returns:

CIE XYZ tristimulus values of the stimulus corresponding colour.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ

1

1

XYZ_p

1

1

XYZ_n

1

1

XYZ_r

1

1

Range

Scale - Reference

Scale - 1

XYZ_a

1

1

References

[Fai20]

Examples

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_p = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_n = np.array([0.96429568, 1.00000000, 0.82510460])
>>> chromatic_adaptation_vK20(XYZ, XYZ_p, XYZ_n)
...
array([ 0.2146884...,  0.1245616...,  0.0466255...])

Using Bradford transform:

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_p = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_n = np.array([0.96429568, 1.00000000, 0.82510460])
>>> transform = "Bradford"
>>> chromatic_adaptation_vK20(XYZ, XYZ_p, XYZ_n, transform=transform)
...
array([ 0.2153837...,  0.1250885...,  0.0466455...])