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.

  • XYZ_n (array_like) – CIE XYZ tristimulus values of reference white.

  • 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.VIEWING_CONDITIONS_RLAB 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

CAM_Specification_RLAB

Notes

Domain

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

XYZ_n

[0, 100]

[0, 1]

Range

Scale - Reference

Scale - 1

CAM_Specification_RLAB.h

[0, 360]

[0, 1]

References

[Fai96], [Fai13h]

Examples

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