colour.lightness¶
-
colour.
lightness
(Y, method=u'CIE 1976', **kwargs)[source]¶ Returns the Lightness \(L\) using given method.
Parameters: - Y (numeric or array_like) – luminance \(Y\).
- method (unicode, optional) – {‘CIE 1976’, ‘Glasser 1958’, ‘Wyszecki 1963’, ‘Fairchild 2010’, ‘Fairchild 2011’}, Computation method.
Other Parameters: - Y_n (numeric or array_like, optional) – {
colour.colorimetry.lightness_CIE1976()
}, White reference luminance \(Y_n\). - epsilon (numeric or array_like, optional) – {
colour.colorimetry.lightness_Fairchild2010()
,colour.colorimetry.lightness_Fairchild2011()
}, \(\epsilon\) exponent.
Returns: Lightness \(L\).
Return type: numeric or array_like
Notes
- Input luminance \(Y\) and optional \(Y_n\) are in domain [0, 100] or [0, \(\infty\)].
- Output Lightness \(L\) is in range [0, 100].
References
Examples
>>> lightness(10.08) 37.9856290... >>> lightness(10.08, Y_n=100) 37.9856290... >>> lightness(10.08, Y_n=95) 38.9165987... >>> lightness(10.08, method='Glasser 1958') 36.2505626... >>> lightness(10.08, method='Wyszecki 1963') 37.0041149... >>> lightness(10.08 / 100, epsilon=1.836, method='Fairchild 2010') ... 24.9022902...