colour.XYZ_to_RLAB

colour.XYZ_to_RLAB(XYZ, XYZ_n, Y_n, sigma=0.4347826086956522, D=1)[source]

Computes the RLAB model color appearance correlates.

Parameters:
  • XYZ (array_like) – CIE XYZ tristimulus values of test sample / stimulus normalised to domain [0, 100].
  • XYZ_n (array_like) – CIE XYZ tristimulus values of reference white normalised to domain [0, 100].
  • Y_n (numeric or array_like) – Absolute adapting luminance in \(cd/m^2\).
  • sigma (numeric or array_like, optional) – Relative luminance of the surround, see colour.RLAB_VIEWING_CONDITIONS for reference.
  • D (numeric or array_like, optional) – Discounting-the-Illuminant factor normalised to domain [0, 1].
Returns:

RLAB colour appearance model specification.

Return type:

RLAB_Specification

Warning

The input domain of that definition is non standard!

Notes

  • Input CIE XYZ tristimulus values are normalised to domain [0, 100].
  • Input CIE XYZ_n tristimulus values are normalised to domain [0, 100].

References

Examples

>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_n = np.array([109.85, 100, 35.58])
>>> Y_n = 31.83
>>> sigma = RLAB_VIEWING_CONDITIONS['Average']
>>> D = RLAB_D_FACTOR['Hard Copy Images']
>>> XYZ_to_RLAB(XYZ, XYZ_n, Y_n, sigma, D)  
RLAB_Specification(J=49.8347069..., C=54.8700585..., h=286.4860208..., s=1.1010410..., HC=None, a=15.5711021..., b=-52.6142956...)