colour.XYZ_to_Hunt

colour.XYZ_to_Hunt(XYZ, XYZ_w, XYZ_b, L_A, surround=Hunt_InductionFactors(N_c=1, N_b=75, N_cb=None, N_bb=None), L_AS=None, CCT_w=None, XYZ_p=None, p=None, S=None, S_w=None, helson_judd_effect=False, discount_illuminant=True)[source]

Computes the Hunt colour appearance model correlates.

Parameters:
  • XYZ (array_like) – CIE XYZ tristimulus values of test sample / stimulus.
  • XYZ_w (array_like) – CIE XYZ tristimulus values of reference white.
  • XYZ_b (array_like) – CIE XYZ tristimulus values of background.
  • L_A (numeric or array_like) – Adapting field luminance \(L_A\) in \(cd/m^2\).
  • surround (Hunt_InductionFactors, optional) – Surround viewing conditions induction factors.
  • L_AS (numeric or array_like, optional) – Scotopic luminance \(L_{AS}\) of the illuminant, approximated if not specified.
  • CCT_w (numeric or array_like, optional) – Correlated color temperature \(T_{cp}\): of the illuminant, needed to approximate \(L_{AS}\).
  • XYZ_p (array_like, optional) – CIE XYZ tristimulus values of proximal field, assumed to be equal to background if not specified.
  • p (numeric or array_like, optional) – 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 (numeric or array_like, optional) – Scotopic response \(S\) to the stimulus, approximated using tristimulus values \(Y\) of the stimulus if not specified.
  • S_w (numeric or array_like, optional) – 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, optional) – Truth value indicating whether the Helson-Judd effect should be accounted for.
  • discount_illuminant (bool, optional) – Truth value indicating if the illuminant should be discounted.
Returns:

Hunt colour appearance model specification.

Return type:

Hunt_Specification

Raises:

ValueError – If an illegal arguments 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
Hunt_Specification.h [0, 360] [0, 1]

References

[Fai13f], [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 = HUNT_VIEWING_CONDITIONS['Normal Scenes']
>>> CCT_w = 6504.0
>>> XYZ_to_Hunt(XYZ, XYZ_w, XYZ_b, L_A, surround, CCT_w=CCT_w)
... # doctest: +ELLIPSIS
Hunt_Specification(J=30.0462678..., C=0.1210508..., h=269.2737594..., s=0.0199093..., Q=22.2097654..., M=0.1238964..., H=None, HC=None)