colour.XYZ_to_Hellwig2022#

colour.XYZ_to_Hellwig2022(XYZ: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100], XYZ_w: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100], L_A: ArrayLike, Y_b: ArrayLike, surround: InductionFactors_CIECAM02 | InductionFactors_Hellwig2022 = VIEWING_CONDITIONS_HELLWIG2022['Average'], discount_illuminant: bool = False, compute_H: bool = True) Annotated[CAM_Specification_Hellwig2022, 100, 100, 360, 100, 100, 100, 400, 100, 100][source]#

Compute the Hellwig and Fairchild (2022) colour appearance model correlates from the specified CIE XYZ tristimulus values.

This implementation supports the Helmholtz-Kohlrausch effect extension from [HSF22].

Parameters:
  • XYZ (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100]) – CIE XYZ tristimulus values of test sample / stimulus.

  • XYZ_w (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100]) – CIE XYZ tristimulus values of reference white.

  • L_A (ArrayLike) – 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 (ArrayLike) – Luminous factor of background \(Y_b\) such as \(Y_b = 100 \times 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, approximating an \(L^*\) of 50 is used.

  • surround (InductionFactors_CIECAM02 | InductionFactors_Hellwig2022) – Surround viewing conditions induction factors.

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

  • compute_H (bool) – Whether to compute Hue \(h\) quadrature \(H\). \(H\) is rarely used, and expensive to compute.

Returns:

Hellwig and Fairchild (2022) colour appearance model specification.

Return type:

colour.CAM_Specification_Hellwig2022

Notes

Domain

Scale - Reference

Scale - 1

XYZ

100

1

XYZ_w

100

1

Range

Scale - Reference

Scale - 1

specification.J

100

1

specification.C

100

1

specification.h

360

1

specification.s

100

1

specification.Q

100

1

specification.M

100

1

specification.H

400

1

specification.J_HK

100

1

specification.Q_HK

100

1

References

[FH22], [HF22], [HSF22]

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_HELLWIG2022["Average"]
>>> XYZ_to_Hellwig2022(XYZ, XYZ_w, L_A, Y_b, surround)
...
CAM_Specification_Hellwig2022(J=np.float64(41.7312079...), C=np.float64(0.0257636...), h=np.float64(217.0679597...), s=np.float64(0.0608550...), Q=np.float64(55.8523226...), M=np.float64(0.0339889...), H=np.float64(275.5949861...), HC=None, J_HK=np.float64(41.8802782...), Q_HK=np.float64(56.0518358...))