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_1976(): luminance \(Y\) computation of given Lightness \(L^*\) as per CIE Lab implementation.
  • luminance_ASTM_D1535_08(): luminance \(Y\) computation of given Munsell value \(V\) using ASTM D1535-08e1 (2008) method.
colour.colorimetry.luminance.luminance_newhall1943(V, **kwargs)[source]

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

Parameters:
  • V (numeric) – Munsell value \(V\).
  • **kwargs (**, optional) – Unused parameter provided for signature compatibility with other luminance computation objects.
Returns:

luminance \(Y\).

Return type:

numeric

Notes

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

References

[1]http://en.wikipedia.org/wiki/Lightness (Last accessed 13 April 2014)

Examples

>>> luminance_newhall1943(3.74629715382)  
10.4089874...
colour.colorimetry.luminance.luminance_1976(L, Yn=100)[source]

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

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

luminance \(Y\).

Return type:

numeric

Notes

  • Input Lightness \(L^*\) is in domain [0, 100].
  • Output luminance \(Y\) is in domain [0, 100].

References

[2]http://www.poynton.com/PDFs/GammaFAQ.pdf (Last accessed 12 April 2014)

Examples

>>> luminance_1976(37.9856290977)  
10.0800000...
colour.colorimetry.luminance.luminance_ASTM_D1535_08(V, **kwargs)[source]

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

Parameters:
  • V (numeric) – Munsell value \(V\).
  • **kwargs (**, optional) – Unused parameter provided for signature compatibility with other luminance computation objects.
Returns:

luminance \(Y\).

Return type:

numeric

Notes

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

References

Examples

>>> luminance_ASTM_D1535_08(3.74629715382)  
10.1488096...
colour.colorimetry.luminance.LUMINANCE_METHODS = CaseInsensitiveMapping({u'astm2008': <function luminance_ASTM_D1535_08 at 0x102e0f668>, u'Newhall 1943': <function luminance_newhall1943 at 0x102e0f578>, u'ASTM D1535-08': <function luminance_ASTM_D1535_08 at 0x102e0f668>, u'CIE 1976': <function luminance_1976 at 0x102e0f5f0>, u'cie1976': <function luminance_1976 at 0x102e0f5f0>})

Supported luminance computations methods.

LUMINANCE_METHODS : dict
(‘Newhall 1943’, ‘CIE 1976’, ‘ASTM D1535-08’)

Aliases:

  • ‘cie1976’: ‘CIE 1976’
  • ‘astm2008’: ‘ASTM D1535-08’
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) – Lightness \(L^*\) or Munsell value \(V\).
  • method (unicode, optional) – (‘Newhall 1943’, ‘CIE 1976’, ‘ASTM D1535-08’) Computation method.
  • **kwargs (**) – Keywords arguments.
Returns:

luminance \(Y\).

Return type:

numeric

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 domain [0, 100].

Examples

>>> luminance(37.9856290977)  
10.0800000...
>>> luminance(37.9856290977, Yn=100)  
10.0800000...
>>> luminance(37.9856290977, Yn=95)  
9.5760000...
>>> luminance(3.74629715382, method='Newhall 1943')  
10.4089874...
>>> luminance(3.74629715382, method='ASTM D1535-08')  
10.1488096...