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 1976 recommendation.
  • luminance_Fairchild2010(): luminance \(Y\) computation of given Lightness \(L_{hdr}\) using Fairchild and Wyble (2010) method.
colour.colorimetry.luminance.luminance_Newhall1943(V)[source]

Returns the luminance \(R_Y\) of given Munsell value \(V\) using Newhall et al. (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_Fairchild2010(L_hdr, epsilon=2)[source]

Computes luminance \(Y\) of given Lightness \(L_{hdr}\) using Fairchild and Wyble (2010) method accordingly to Michealis-Menten kinetics.

Parameters:
  • L_hdr (array_like) – Lightness \(L_{hdr}\).
  • epsilon (numeric or array_like, optional) – \(\epsilon\) exponent.
Returns:

luminance \(Y\).

Return type:

array_like

Warning

The output range of that definition is non standard!

Notes

  • Output luminance \(Y\) is in range [0, math:infty].

References

[4]Fairchild, M. D., & Wyble, D. R. (2010). hdr-CIELAB and hdr-IPT: Simple Models for Describing the Color of High-Dynamic-Range and Wide-Color-Gamut Images. In Proc. of Color and Imaging Conference (pp. 322–326). ISBN:9781629932156

Examples

>>> luminance_Fairchild2010(
...     24.902290269546651, 1.836)  
0.1007999...
colour.colorimetry.luminance.LUMINANCE_METHODS = CaseInsensitiveMapping({u'cie1976': <function luminance_CIE1976>, u'Newhall 1943': <function luminance_Newhall1943>, u'ASTM D1535-08': <function luminance_ASTMD153508>, u'CIE 1976': <function luminance_CIE1976>, u'Fairchild 2010': <function luminance_Fairchild2010>, u'astm2008': <function luminance_ASTMD153508>})

Supported luminance computations methods.

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

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’, ‘Fairchild 2010’}, Computation method.
Other Parameters:
 
  • Y_n (numeric or array_like, optional) – {luminance_CIE1976()}, White reference luminance \(Y_n\).
  • epsilon (numeric or array_like, optional) – {lightness_Fairchild2010()}, \(\epsilon\) exponent.
Returns:

luminance \(Y\).

Return type:

numeric or array_like

Notes

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

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...
>>> luminance(
...     24.902290269546651,
...     epsilon=1.836,
...     method='Fairchild 2010')  
0.1007999...