colour.lightness#
- colour.lightness(Y: Domain100, method: Literal['Abebe 2017', 'CIE 1976', 'Glasser 1958', 'Fairchild 2010', 'Fairchild 2011', 'Wyszecki 1963'] | str = 'CIE 1976', **kwargs: Any) Range100[source]#
Compute the lightness \(L\) from the specified luminance \(Y\).
- Parameters:
Y (Domain100) – Luminance \(Y\).
method (Literal['Abebe 2017', 'CIE 1976', 'Glasser 1958', 'Fairchild 2010', 'Fairchild 2011', 'Wyszecki 1963'] | str) – Computation method.
Y_n – {
colour.colorimetry.lightness_Abebe2017(),colour.colorimetry.lightness_CIE1976()}, White reference luminance \(Y_n\).epsilon – {
colour.colorimetry.lightness_Fairchild2010(),colour.colorimetry.lightness_Fairchild2011()}, \(\epsilon\) exponent.kwargs (Any)
- Returns:
Lightness \(L\).
- Return type:
Notes
Domain
Scale - Reference
Scale - 1
Y100
1
Range
Scale - Reference
Scale - 1
L100
1
References
[APLR17], [CIET14804h], [FW10], [FC11], [GMRS58], [Wikipedia07a], [Wys63], [WS00l]
Examples
>>> lightness(12.19722535) np.float64(41.5278758...) >>> lightness(12.19722535, Y_n=100) np.float64(41.5278758...) >>> lightness(12.19722535, Y_n=95) np.float64(42.5199307...) >>> lightness(12.19722535, method="Glasser 1958") np.float64(39.8351264...) >>> lightness(12.19722535, method="Wyszecki 1963") np.float64(40.5475745...) >>> lightness(12.19722535, epsilon=0.710, method="Fairchild 2011") ... np.float64(29.8295108...) >>> lightness(12.19722535, epsilon=0.710, method="Fairchild 2011") ... np.float64(29.8295108...) >>> lightness(12.19722535, method="Abebe 2017") ... np.float64(48.6955571...)