colour.XYZ_to_Hunt#

colour.XYZ_to_Hunt(XYZ: ArrayLike, XYZ_w: ArrayLike, XYZ_b: ArrayLike, L_A: ArrayLike, surround: InductionFactors_Hunt = VIEWING_CONDITIONS_HUNT['Normal Scenes'], L_AS: ArrayLike | None = None, CCT_w: ArrayLike | None = None, XYZ_p: ArrayLike | None = None, p: ArrayLike | None = None, S: ArrayLike | None = None, S_w: ArrayLike | None = None, helson_judd_effect: bool = False, discount_illuminant: bool = True) CAM_Specification_Hunt[source]#

Compute the Hunt colour appearance model correlates.

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

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

  • XYZ_b (ArrayLike) – CIE XYZ tristimulus values of background.

  • L_A (ArrayLike) – Adapting field luminance \(L_A\) in \(cd/m^2\).

  • surround (InductionFactors_Hunt) – Surround viewing conditions induction factors.

  • L_AS (ArrayLike | None) – Scotopic luminance \(L_{AS}\) of the illuminant, approximated if not specified.

  • CCT_w (ArrayLike | None) – Correlated color temperature \(T_{cp}\): of the illuminant, needed to approximate \(L_{AS}\).

  • XYZ_p (ArrayLike | None) – CIE XYZ tristimulus values of proximal field, assumed to be equal to background if not specified.

  • p (ArrayLike | None) – Simultaneous contrast / assimilation factor \(p\) with value normalised to domain [-1, 0] when simultaneous contrast occurs and normalised to domain [0, 1] when assimilation occurs.

  • S (ArrayLike | None) – Scotopic response \(S\) to the stimulus, approximated using tristimulus values \(Y\) of the stimulus if not specified.

  • S_w (ArrayLike | None) – Scotopic response \(S_w\) for the reference white, approximated using the tristimulus values \(Y_w\) of the reference white if not specified.

  • helson_judd_effect (bool) – Truth value indicating whether the Helson-Judd effect should be accounted for.

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

Returns:

Hunt colour appearance model specification.

Return type:

colour.CAM_Specification_Hunt

Raises:

ValueError – If an illegal argument combination is specified.

Notes

Domain

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

XYZ_w

[0, 100]

[0, 1]

XYZ_b

[0, 100]

[0, 1]

XYZ_p

[0, 100]

[0, 1]

Range

Scale - Reference

Scale - 1

CAM_Specification_Hunt.h

[0, 360]

[0, 1]

References

[Fai13b], [Hun04]

Examples

>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_w = np.array([95.05, 100.00, 108.88])
>>> XYZ_b = np.array([95.05, 100.00, 108.88])
>>> L_A = 318.31
>>> surround = VIEWING_CONDITIONS_HUNT["Normal Scenes"]
>>> CCT_w = 6504
>>> XYZ_to_Hunt(XYZ, XYZ_w, XYZ_b, L_A, surround, CCT_w=CCT_w)
... 
CAM_Specification_Hunt(J=30.0462678..., C=0.1210508..., h=269.2737594..., s=0.0199093..., Q=22.2097654..., M=0.1238964..., H=None, HC=None)