colour.adaptation.chromatic_adaptation_CMCCAT2000#
- colour.adaptation.chromatic_adaptation_CMCCAT2000(XYZ: Domain100, XYZ_w: Domain100, XYZ_wr: Domain100, L_A1: ArrayLike, L_A2: ArrayLike, surround: InductionFactors_CMCCAT2000 = VIEWING_CONDITIONS_CMCCAT2000['Average'], direction: Literal['Forward', 'Inverse'] | str = 'Forward') Range100[source]#
Adapt the specified stimulus CIE XYZ tristimulus values from test viewing conditions to reference viewing conditions using the CMCCAT2000 chromatic adaptation model.
This definition provides a convenient wrapper around
colour.adaptation.chromatic_adaptation_forward_CMCCAT2000()andcolour.adaptation.chromatic_adaptation_inverse_CMCCAT2000().- Parameters:
XYZ (Domain100) – CIE XYZ tristimulus values of the stimulus to adapt.
XYZ_w (Domain100) – Source viewing condition CIE XYZ tristimulus values of the whitepoint.
XYZ_wr (Domain100) – Target viewing condition CIE XYZ tristimulus values of the whitepoint.
L_A1 (ArrayLike) – Luminance of test adapting field \(L_{A1}\) in \(cd/m^2\).
L_A2 (ArrayLike) – Luminance of reference adapting field \(L_{A2}\) in \(cd/m^2\).
surround (InductionFactors_CMCCAT2000) – Surround viewing conditions induction factors.
direction (Literal['Forward', 'Inverse'] | str) – Chromatic adaptation direction.
- Returns:
CIE XYZ tristimulus values of the stimulus corresponding colour.
- Return type:
Notes
Domain
Scale - Reference
Scale - 1
XYZ100
1
XYZ_w100
1
XYZ_wr100
1
Range
Scale - Reference
Scale - 1
XYZ100
1
References
Examples
>>> XYZ = np.array([22.48, 22.74, 8.54]) >>> XYZ_w = np.array([111.15, 100.00, 35.20]) >>> XYZ_wr = np.array([94.81, 100.00, 107.30]) >>> L_A1 = 200 >>> L_A2 = 200 >>> chromatic_adaptation_CMCCAT2000( ... XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, direction="Forward" ... ) ... array([ 19.5269832..., 23.0683396..., 24.9717522...])
Using the CMCCAT2000 inverse model:
>>> XYZ = np.array([19.52698326, 23.06833960, 24.97175229]) >>> XYZ_w = np.array([111.15, 100.00, 35.20]) >>> XYZ_wr = np.array([94.81, 100.00, 107.30]) >>> L_A1 = 200 >>> L_A2 = 200 >>> chromatic_adaptation_CMCCAT2000( ... XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, direction="Inverse" ... ) ... array([ 22.48, 22.74, 8.54])