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.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
Notes
Domain
Scale - Reference
Scale - 1
XYZ
[0, 100]
[0, 1]
XYZ_n
[0, 100]
[0, 1]
Range
Scale - Reference
Scale - 1
RLAB_Specification.h
[0, 360]
[0, 1]
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...)