colour.XYZ_to_CIECAM16#

colour.XYZ_to_CIECAM16(XYZ: ArrayLike, XYZ_w: ArrayLike, L_A: FloatingOrArrayLike, Y_b: FloatingOrArrayLike, surround: Union[InductionFactors_CIECAM02, InductionFactors_CIECAM16] = VIEWING_CONDITIONS_CIECAM16['Average'], discount_illuminant: bool = False) CAM_Specification_CIECAM16[source]#

Compute the CIECAM16 colour appearance model correlates from given CIE XYZ tristimulus values.

Parameters:
  • XYZ (ArrayLike) – CIE XYZ tristimulus values of test sample / stimulus.

  • XYZ_w (ArrayLike) – CIE XYZ tristimulus values of reference white.

  • L_A (FloatingOrArrayLike) – Adapting field luminance \(L_A\) in \(cd/m^2\), (often taken to be 20% of the luminance of a white object in the scene).

  • Y_b (FloatingOrArrayLike) – Luminous factor of background \(Y_b\) such as \(Y_b = 100 x L_b / L_w\) where \(L_w\) is the luminance of the light source and \(L_b\) is the luminance of the background. For viewing images, \(Y_b\) can be the average \(Y\) value for the pixels in the entire image, or frequently, a \(Y\) value of 20, approximate an \(L^*\) of 50 is used.

  • surround (Union[InductionFactors_CIECAM02, InductionFactors_CIECAM16]) – Surround viewing conditions induction factors.

  • discount_illuminant (bool) – Truth value indicating if the illuminant should be discounted.

Returns:

CIECAM16 colour appearance model specification.

Return type:

colour.CAM_Specification_CIECAM16

Notes

Domain

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

XYZ_w

[0, 100]

[0, 1]

Range

Scale - Reference

Scale - 1

CAM_Specification_CIECAM16.J

[0, 100]

[0, 1]

CAM_Specification_CIECAM16.C

[0, 100]

[0, 1]

CAM_Specification_CIECAM16.h

[0, 360]

[0, 1]

CAM_Specification_CIECAM16.s

[0, 100]

[0, 1]

CAM_Specification_CIECAM16.Q

[0, 100]

[0, 1]

CAM_Specification_CIECAM16.M

[0, 100]

[0, 1]

CAM_Specification_CIECAM16.H

[0, 400]

[0, 1]

References

[CIED1CIED822]

Examples

>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_w = np.array([95.05, 100.00, 108.88])
>>> L_A = 318.31
>>> Y_b = 20.0
>>> surround = VIEWING_CONDITIONS_CIECAM16["Average"]
>>> XYZ_to_CIECAM16(XYZ, XYZ_w, L_A, Y_b, surround)  
CAM_Specification_CIECAM16(J=41.7312079..., C=0.1033557..., h=217.0679597..., s=2.3450150..., Q=195.3717089..., M=0.1074367..., H=275.5949861..., HC=None)