colour.lightness¶
-
colour.lightness(Y, method='CIE 1976', **kwargs)[source]¶ Returns the Lightness \(L\) of given luminance \(Y\) 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
Domain Scale - Reference Scale - 1 Y[0, 100] [0, 1] Range Scale - Reference Scale - 1 L[0, 100] [0, 1] References
[CIET14804f], [FW10], [FC11], [GMRS58], [Wik07d], [Wys63], [WS00c]
Examples
>>> lightness(12.19722535) # doctest: +ELLIPSIS 41.5278758... >>> lightness(12.19722535, Y_n=100) # doctest: +ELLIPSIS 41.5278758... >>> lightness(12.19722535, Y_n=95) # doctest: +ELLIPSIS 42.5199307... >>> lightness(12.19722535, method='Glasser 1958') # doctest: +ELLIPSIS 39.8351264... >>> lightness(12.19722535, method='Wyszecki 1963') # doctest: +ELLIPSIS 40.5475745... >>> lightness(12.19722535, epsilon=0.710, method='Fairchild 2011') ... # doctest: +ELLIPSIS 29.8295108...