import colour
sorted(colour.LIGHTNESS_METHODS.keys())
['CIE 1976', 'Fairchild 2010', 'Fairchild 2011', 'Glasser 1958', 'Lstar1976', 'Wyszecki 1963']
Note:
'Lstar1976'
is a convenient aliases for'CIE 1976'
.
Glasser, Mckinney, Reilly and Schnelle (1958) described a visually uniform colour coordinate system close to Adams chromatic-value system but where the quintic-parabola function has been replaced with a cube-root function: the Cube-Root Color Coordinate System.
Lightness $L$ in the Cube-Root Color Coordinate System is calculated as follows: [2]
$$ \begin{equation} L=25.29Y^{1/3}-18.38 \end{equation} $$where $Y$ defines the luminance in domain [0, 100].
The colour.lightness_Glasser1958
definition is used to compute Lightness $L$:
colour.colorimetry.lightness_Glasser1958(10.08)
36.250562645752595
Note: Input luminance $Y$ is in domain [0, 100], output Lightness $L$ is in domain [0, 100].
The colour.lightness
definition is implemented as a wrapper for various lightness computation methods:
colour.lightness(10.08, method='Glasser 1958')
36.250562645752595
from colour.plotting import *
colour_style();
# Plotting the "Glasser (1958)" "Lightness" function.
plot_single_lightness_function('Glasser 1958');
Wyszecki (1963) recommended the following cube root function to compute Lightness $W$ as a function of the luminance factor $Y$ within the practically important range of $1.0\%<Y<98\%$: [3]
$$ \begin{equation} W=25Y^{1/3}-17 \end{equation} $$The colour.lightness_Wyszecki1963
definition is used to compute Lightness $W$:
colour.colorimetry.lightness_Wyszecki1963(10.08)
37.004114912764535
Note: Input luminance $Y$ is in domain [0, 100], output Lightness $W$ is in domain [0, 100].
Using the colour.lightness
wrapper definition:
colour.lightness(10.08, method='Wyszecki 1963')
37.004114912764535
# Plotting the "Wyszecki (1963)" "Lightness" function.
with colour.utilities.suppress_warnings():
plot_single_lightness_function('Wyszecki 1963');
The CIE $L^a^b^$* approximately uniform colourspace defined in 1976 computes the *Lightness* $L^*$ quantity as follows: [4]
$$ \begin{equation} L^*=\begin{cases}116\biggl(\cfrac{Y}{Y_n}\biggr)^{1/3}-16 & for\ \cfrac{Y}{Y_n}>\epsilon\\ \kappa*\biggl(\cfrac{Y}{Y_n}\biggr) & for\ \cfrac{Y}{Y_n}<=\epsilon \end{cases} \end{equation} $$where $Y_n$ is the reference white luminance. with $$ \begin{equation} \begin{aligned} \epsilon&\ =\begin{cases}0.008856 & Actual\ CIE\ Standard\\ 216\ /\ 24389 & Intent\ of\ the\ CIE\ Standard \end{cases}\\ \kappa&\ =\begin{cases}903.3 & Actual\ CIE\ Standard\\ 24389\ /\ 27 & Intent\ of\ the\ CIE\ Standard \end{cases} \end{aligned} \end{equation} $$
The original $\epsilon$ and $\kappa$ constants values have been shown to exhibit discontinuity at the junction point of the two functions grafted together to create the Lightness $L^*$ function. [5]
Colour uses the rational values instead of the decimal values for these constants.
See Also: The CIE $L^*a^*b^*$ Colourspace notebook for in-depth informations about the CIE $L^a^b^$* colourspace.
The colour.lightness_CIE1976
definition is used to compute Lightness $L^*$:
colour.colorimetry.lightness_CIE1976(10.08)
37.985629097653039
Note: Input luminance $Y$ and $Y_n$ are in domain [0, 100], output Lightness $L^*$ is in domain [0, 100].
Using the colour.lightness
wrapper definition:
colour.lightness(10.08)
37.985629097653039
colour.lightness(10.08, method='CIE 1976', Y_n=95)
38.916598757092821
colour.lightness(10.08, method='Lstar1976', Y_n=95)
38.916598757092821
# Plotting the "CIE 1976" "Lightness" function.
plot_single_lightness_function('CIE 1976');
# Plotting multiple "Lightness" functions for comparison.
plot_multi_lightness_functions(['CIE 1976', 'Glasser 1958']);
colour.colorimetry.lightness_Fairchild2010(10.08 / 100, 1.836)
24.902290269546651
colour.lightness(10.08 / 100, method='Fairchild 2010', epsilon=1.836)
0.027048835900068357
# Plotting the "Fairchild and Wyble (2010)" "Lightness" function.
plot_single_lightness_function('Fairchild 2010');
# Plotting multiple "Lightness" functions for comparison.
plot_multi_lightness_functions(['CIE 1976', 'Fairchild 2010']);
colour.colorimetry.lightness_Fairchild2011(10.08 / 100, 0.710)
26.459509817572265
colour.lightness(10.08 / 100, method='Fairchild 2011', epsilon=0.710)
1.1405928270854113
# Plotting the "Fairchild and Chen (2011)" "Lightness" function.
plot_single_lightness_function('Fairchild 2011');