# colour.colorimetry.lightness Module¶

## Lightness $$L^*$$¶

Defines Lightness $$L^*$$ computation objects.

The following methods are available:

References

 [1] Wikipedia. (n.d.). Lightness. Retrieved April 13, 2014, from http://en.wikipedia.org/wiki/Lightness
colour.colorimetry.lightness.lightness_Glasser1958(Y)[source]

Returns the Lightness $$L$$ of given luminance $$Y$$ using Glasser et al. (1958) method.

Parameters: Y (numeric or array_like) – luminance $$Y$$. Lightness $$L$$. numeric or array_like

Notes

• Input luminance $$Y$$ is in domain [0, 100].
• Output Lightness $$L$$ is in range [0, 100].

References

 [2] Glasser, L. G., McKinney, A. H., Reilly, C. D., & Schnelle, P. D. (1958). Cube-Root Color Coordinate System. J. Opt. Soc. Am., 48(10), 736–740. doi:10.1364/JOSA.48.000736

Examples

>>> lightness_Glasser1958(10.08)
36.2505626...

colour.colorimetry.lightness.lightness_Wyszecki1963(Y)[source]

Returns the Lightness $$W$$ of given luminance $$Y$$ using Wyszecki (1963) method.

Parameters: Y (numeric or array_like) – luminance $$Y$$. Lightness $$W$$. numeric or array_like

Notes

• Input luminance $$Y$$ is in domain [0, 100].
• Output Lightness $$W$$ is in range [0, 100].

References

 [3] Wyszecki, G. (1963). Proposal for a New Color-Difference Formula. J. Opt. Soc. Am., 53(11), 1318–1319. doi:10.1364/JOSA.53.001318

Examples

>>> lightness_Wyszecki1963(10.08)
37.0041149...

colour.colorimetry.lightness.lightness_CIE1976(Y, Y_n=100)[source]

Returns the Lightness $$L^*$$ of given luminance $$Y$$ using given reference white luminance $$Y_n$$ as per CIE 1976 recommendation.

Parameters: Y (numeric or array_like) – luminance $$Y$$. Y_n (numeric or array_like, optional) – White reference luminance $$Y_n$$. Lightness $$L^*$$. numeric or array_like

Notes

• Input luminance $$Y$$ and $$Y_n$$ are in domain [0, 100].
• Output Lightness $$L^*$$ is in range [0, 100].

References

 [4] Wyszecki, G., & Stiles, W. S. (2000). CIE 1976 (L*u*v*)-Space and Color-Difference Formula. In Color Science: Concepts and Methods, Quantitative Data and Formulae (p. 167). Wiley. ISBN:978-0471399186
 [5] Lindbloom, B. (2003). A Continuity Study of the CIE L* Function. Retrieved February 24, 2014, from http://brucelindbloom.com/LContinuity.html

Examples

>>> lightness_CIE1976(10.08)
array(37.9856290...)

colour.colorimetry.lightness.LIGHTNESS_METHODS = CaseInsensitiveMapping({u'Lstar1976': <function lightness_CIE1976>, u'Wyszecki 1963': <function lightness_Wyszecki1963>, u'CIE 1976': <function lightness_CIE1976>, u'Glasser 1958': <function lightness_Glasser1958>})

Supported Lightness computations methods.

LIGHTNESS_METHODS : CaseInsensitiveMapping
{‘Glasser 1958’, ‘Wyszecki 1963’, ‘CIE 1976’}

Aliases:

• ‘Lstar1976’: ‘CIE 1976’
colour.colorimetry.lightness.lightness(Y, method=u'CIE 1976', **kwargs)[source]

Returns the Lightness $$L^*$$ using given method.

Parameters: Other Parameters: Y (numeric or array_like) – luminance $$Y$$. method (unicode, optional) – {‘CIE 1976’, ‘Glasser 1958’, ‘Wyszecki 1963’}, Computation method. Y_n (numeric or array_like, optional) – {lightness_CIE1976()}, White reference luminance $$Y_n$$. Lightness $$L^*$$. numeric or array_like

Notes

• Input luminance $$Y$$ and optional $$Y_n$$ are in domain [0, 100].
• Output Lightness $$L^*$$ is in range [0, 100].

Examples

>>> lightness(10.08)
array(37.9856290...)
>>> lightness(10.08, Y_n=100)
array(37.9856290...)
>>> lightness(10.08, Y_n=95)
array(38.9165987...)
>>> lightness(10.08, method='Glasser 1958')
36.2505626...
>>> lightness(10.08, method='Wyszecki 1963')
37.0041149...