colour.notation Package¶
Sub-Packages¶
Sub-Modules¶
Module Contents¶
-
colour.notation.
munsell_value
(Y, method=u'ASTM D1535-08')[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using given method.
Parameters: - Y (numeric or array_like) – luminance \(Y\).
- method (unicode, optional) – {‘ASTM D1535-08’, ‘Priest 1920’, ‘Munsell 1933’, ‘Moon 1943’, ‘Saunderson 1944’, ‘Ladd 1955’, ‘McCamy 1987’}, Computation method.
Returns: Munsell value \(V\).
Return type: numeric or ndarray
Notes
- Input Y is in domain [0, 100].
- Output V is in range [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') array(3.7347235...)
-
colour.notation.
munsell_value_Priest1920
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using Priest, Gibson and MacNicholas (1920) method.
Parameters: Y (numeric or array_like) – luminance \(Y\). Returns: Munsell value \(V\). Return type: numeric or ndarray Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
References
[3] (1, 2, 3, 4) Wikipedia. (n.d.). Lightness. Retrieved April 13, 2014, from http://en.wikipedia.org/wiki/Lightness Examples
>>> munsell_value_Priest1920(10.08) 3.1749015...
-
colour.notation.
munsell_value_Munsell1933
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using Munsell, Sloan and Godlove (1933) method. [3]
Parameters: Y (numeric or array_like) – luminance \(Y\). Returns: Munsell value \(V\). Return type: numeric or ndarray Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
Examples
>>> munsell_value_Munsell1933(10.08) 3.7918355...
-
colour.notation.
munsell_value_Moon1943
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using Moon and Spencer (1943) method. [3]
Parameters: Y (numeric or array_like) – luminance \(Y\). Returns: Munsell value \(V\). Return type: numeric or ndarray Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
Examples
>>> munsell_value_Moon1943(10.08) 3.7462971...
-
colour.notation.
munsell_value_Saunderson1944
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using Saunderson and Milner (1944) method. [3]
Parameters: Y (numeric) – luminance \(Y\). Returns: Munsell value \(V\). Return type: numeric Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
Examples
>>> munsell_value_Saunderson1944(10.08) 3.6865080...
-
colour.notation.
munsell_value_Ladd1955
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using Ladd and Pinney (1955) method. [3]
Parameters: Y (numeric or array_like) – luminance \(Y\). Returns: Munsell value \(V\). Return type: numeric or ndarray Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
Examples
>>> munsell_value_Ladd1955(10.08) 3.6952862...
-
colour.notation.
munsell_value_McCamy1987
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using McCamy (1987) method.
Parameters: Y (numeric or array_like) – luminance \(Y\). Returns: Munsell value \(V\). Return type: numeric or ndarray Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
References
[4] ASTM International. (1989). ASTM D1535-89 Standard Test Method for Specifying Color by the Munsell System. Retrieved from http://www.astm.org/DATABASE.CART/HISTORICAL/D1535-89.htm Examples
>>> munsell_value_McCamy1987(10.08) array(3.7347235...)
-
colour.notation.
munsell_value_ASTMD153508
(Y)[source]¶ Returns the Munsell value \(V\) of given luminance \(Y\) using a reverse lookup table from ASTM D1535-08e1 method.
Parameters: Y (numeric or array_like) – luminance \(Y\) Returns: Munsell value \(V\). Return type: numeric or ndarray Notes
- Input Y is in domain [0, 100].
- Output V is in range [0, 10].
Examples
>>> munsell_value_ASTMD153508(10.1488096782) 3.7462971...
-
colour.notation.
munsell_colour_to_xyY
(munsell_colour)[source]¶ Converts given Munsell colour to CIE xyY colourspace.
Parameters: munsell_colour (unicode) – Munsell colour. Returns: CIE xyY colourspace array. Return type: ndarray, (3,) Notes
- Output CIE xyY colourspace array is in range [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)[source]¶ Converts from CIE xyY colourspace to Munsell colour.
Parameters: Returns: Munsell colour.
Return type: unicode
Notes
- Input CIE xyY colourspace array is in domain [0, 1].
Examples
>>> xyY = np.array([0.38736945, 0.35751656, 0.59362000]) >>> # Doctests skip for Python 2.x compatibility. >>> xyY_to_munsell_colour(xyY) '4.2YR 8.1/5.3'