colour.colorimetry.luminance Module

Luminance \(Y\)

Defines luminance \(Y\) computation objects.

The following methods are available:

  • luminance_Newhall1943(): luminance \(Y\) computation of given Munsell value \(V\) using Newhall, Nickerson, and Judd (1943) method.
  • luminance_ASTMD153508(): luminance \(Y\) computation of given Munsell value \(V\) using ASTM D1535-08e1 method.
  • luminance_CIE1976(): luminance \(Y\) computation of given Lightness \(L^*\) as per CIE Lab implementation.
colour.colorimetry.luminance.luminance_Newhall1943(V)[source]

Returns the luminance \(R_Y\) of given Munsell value \(V\) using Newhall, Nickerson, and Judd (1943) method.

Parameters:V (numeric or array_like) – Munsell value \(V\).
Returns:luminance \(R_Y\).
Return type:numeric or array_like

Notes

  • Input Munsell value \(V\) is in domain [0, 10].
  • Output luminance \(R_Y\) is in range [0, 100].

References

[1]Newhall, S. M., Nickerson, D., & Judd, D. B. (1943). Final report of the OSA subcommittee on the spacing of the munsell colors. JOSA, 33(7), 385. doi:10.1364/JOSA.33.000385

Examples

>>> luminance_Newhall1943(3.74629715382)  
10.4089874...
colour.colorimetry.luminance.luminance_ASTMD153508(V)[source]

Returns the luminance \(Y\) of given Munsell value \(V\) using ASTM D1535-08e1 method.

Parameters:V (numeric or array_like) – Munsell value \(V\).
Returns:luminance \(Y\).
Return type:numeric or array_like

Notes

  • Input Munsell value \(V\) is in domain [0, 10].
  • Output luminance \(Y\) is in range [0, 100].

References

[4]ASTM International. (n.d.). ASTM D1535-08e1 Standard Practice for Specifying Color by the Munsell System. doi:10.1520/D1535-08E01

Examples

>>> luminance_ASTMD153508(3.74629715382)  
10.1488096...
colour.colorimetry.luminance.luminance_CIE1976(Lstar, Y_n=100)[source]

Returns the luminance \(Y\) of given Lightness \(L^*\) with given reference white luminance \(Y_n\).

Parameters:
  • Lstar (numeric or array_like) – Lightness \(L^*\)
  • Y_n (numeric or array_like) – White reference luminance \(Y_n\).
Returns:

luminance \(Y\).

Return type:

numeric or array_like

Notes

  • Input Lightness \(L^*\) and reference white luminance \(Y_n\) are in domain [0, 100].
  • Output luminance \(Y\) is in range [0, 100].

References

[2]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
[3]Lindbloom, B. (2003). A Continuity Study of the CIE L* Function. Retrieved February 24, 2014, from http://brucelindbloom.com/LContinuity.html

Examples

>>> luminance_CIE1976(37.98562910)  
array(10.0800000...)
>>> luminance_CIE1976(37.98562910, 95)  
array(9.5760000...)
colour.colorimetry.luminance.LUMINANCE_METHODS = CaseInsensitiveMapping({u'astm2008': <function luminance_ASTMD153508 at 0x7f5de0ab1410>, u'Newhall 1943': <function luminance_Newhall1943 at 0x7f5de0ab1398>, u'ASTM D1535-08': <function luminance_ASTMD153508 at 0x7f5de0ab1410>, u'CIE 1976': <function luminance_CIE1976 at 0x7f5de0ab1488>, u'cie1976': <function luminance_CIE1976 at 0x7f5de0ab1488>})

Supported luminance computations methods.

LUMINANCE_METHODS : CaseInsensitiveMapping
{‘Newhall 1943’, ‘ASTM D1535-08’, ‘CIE 1976’}

Aliases:

  • ‘astm2008’: ‘ASTM D1535-08’
  • ‘cie1976’: ‘CIE 1976’
colour.colorimetry.luminance.luminance(LV, method=u'CIE 1976', **kwargs)[source]

Returns the luminance \(Y\) of given Lightness \(L^*\) or given Munsell value \(V\).

Parameters:
  • LV (numeric or array_like) – Lightness \(L^*\) or Munsell value \(V\).
  • method (unicode, optional) – {‘CIE 1976’, ‘Newhall 1943’, ‘ASTM D1535-08’}, Computation method.
  • **kwargs (dict, optional) – Keywords arguments.
Returns:

luminance \(Y\).

Return type:

numeric or array_like

Notes

  • Input LV is in domain [0, 100] or [0, 10] and optional luminance \(Y_n\) is in domain [0, 100].
  • Output luminance \(Y\) is in range [0, 100].

Examples

>>> luminance(37.98562910)  
array(10.0800000...)
>>> luminance(37.98562910, Y_n=100)  
array(10.0800000...)
>>> luminance(37.98562910, Y_n=95)  
array(9.5760000...)
>>> luminance(3.74629715, method='Newhall 1943')  
10.4089874...
>>> luminance(3.74629715, method='ASTM D1535-08')  
10.1488096...