colour.notation Package

Module Contents

colour.notation.munsell_value(Y, method=u'ASTM D1535-08')

Returns the Munsell value \(V\) of given luminance \(Y\) using given method.

Parameters:
  • Y (numeric) – luminance \(Y\).
  • method (unicode, optional) – (‘Priest 1920’, ‘Munsell 1933’, ‘Moon 1943’, ‘Saunderson 1944’, ‘Ladd 1955’, ‘McCamy 1987’, ‘ASTM D1535-08’) Computation method.
Returns:

Munsell value \(V\).

Return type:

numeric

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

Examples

>>> munsell_value(10.08)  
3.7344764...
>>> munsell_value(10.08, method='Priest 1920')  
3.1749015...
>>> munsell_value(10.08, method='Munsell 1933')  
3.7918355...
>>> munsell_value(10.08, method='Moon 1943')  
3.7462971...
>>> munsell_value(10.08, method='Saunderson 1944')  
3.6865080...
>>> munsell_value(10.08, method='Ladd 1955')  
3.6952862...
>>> munsell_value(10.08, method='McCamy 1987')  
3.7347235...
colour.notation.munsell_value_priest1920(Y)

Returns the Munsell value \(V\) of given luminance \(Y\) using Priest et al. (1920) method.

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

References

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

Examples

>>> munsell_value_priest1920(10.08)  
3.1749015...
colour.notation.munsell_value_munsell1933(Y)

Returns the Munsell value \(V\) of given luminance \(Y\) using Munsell, Sloan, and Godlove (1933) method.

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

References

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

Examples

>>> munsell_value_munsell1933(10.08)  
3.7918355...
colour.notation.munsell_value_moon1943(Y)

Returns the Munsell value \(V\) of given luminance \(Y\) using Moon and Spencer (1943) method.

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

References

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

Examples

>>> munsell_value_moon1943(10.08)  
3.7462971...
colour.notation.munsell_value_saunderson1944(Y)

Returns the Munsell value \(V\) of given luminance \(Y\) using Saunderson and Milner (1944) method.

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

References

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

Examples

>>> munsell_value_saunderson1944(10.08)  
3.6865080...
colour.notation.munsell_value_ladd1955(Y)

Returns the Munsell value \(V\) of given luminance \(Y\) using Ladd and Pinney (1955) method.

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

References

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

Examples

>>> munsell_value_ladd1955(10.08)  
3.6952862...
colour.notation.munsell_value_mccamy1987(Y)

Returns the Munsell value \(V\) of given luminance \(Y\) using McCamy (1987) method.

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

References

[19]Standard Test Method for Specifying Color by the Munsell System - ASTM-D1535-1989

Examples

>>> munsell_value_mccamy1987(10.08)  
3.7347235...
colour.notation.munsell_value_ASTM_D1535_08(Y)

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

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

Notes

  • Input Y is in domain [0, 100].
  • Output V is in domain [0, 10].

Examples

>>> munsell_value_ASTM_D1535_08(10.1488096782)  
3.7462971...
colour.notation.munsell_colour_to_xyY(munsell_colour)

Converts given Munsell colour to CIE xyY colourspace.

Parameters:munsell_colour (unicode) – Munsell colour.
Returns:CIE xyY colourspace matrix.
Return type:ndarray, (3,)

Notes

  • Output CIE xyY colourspace matrix is in domain [0, 1].

Examples

>>> munsell_colour_to_xyY('4.2YR 8.1/5.3')  
array([ 0.3873694...,  0.3575165...,  0.59362   ])
>>> munsell_colour_to_xyY('N8.9')  
array([ 0.31006  ,  0.31616  ,  0.746134...])
colour.notation.xyY_to_munsell_colour(xyY, hue_decimals=1, value_decimals=1, chroma_decimals=1)

Converts from CIE xyY colourspace to Munsell colour.

Parameters:
  • xyY (array_like, (3,)) – CIE xyY colourspace matrix.
  • hue_decimals (int) – Hue formatting decimals.
  • value_decimals (int) – Value formatting decimals.
  • chroma_decimals (int) – Chroma formatting decimals.
Returns:

Munsell colour.

Return type:

unicode

Notes

  • Input CIE xyY colourspace matrix is in domain [0, 1].

Examples

>>> xyY = np.array([0.38736945, 0.35751656, 0.59362])
>>> # Doctests skip for Python 2.x compatibility.
>>> xyY_to_munsell_colour(xyY)  
'4.2YR 8.1/5.3'