colour.whiteness

colour.whiteness(method='CIE 2004', **kwargs)[source]

Returns the whiteness \(W\) using given method.

Parameters:

method (unicode, optional) – {‘CIE 2004’, ‘Berger 1959’, ‘Taube 1960’, ‘Stensby 1968’, ‘ASTM E313’, ‘Ganz 1979’}, Computation method.

Other Parameters:
 
Returns:

whiteness \(W\).

Return type:

numeric or ndarray

Notes

Domain Scale - Reference Scale - 1
Lab

L : [0, 100]

a : [-100, 100]

b : [-100, 100]

L : [0, 1]

a : [-1, 1]

b : [-1, 1]

XYZ [0, 100] [0, 1]
XYZ_0 [0, 100] [0, 1]
Y [0, 100] [0, 1]
Range Scale - Reference Scale - 1
W [0, 100] [0, 1]

References

[CIET14804i], [WS00k], [XRP12], [Wik04c]

Examples

>>> import numpy as np
>>> xy = np.array([0.3167, 0.3334])
>>> Y = 100
>>> xy_n = np.array([0.3139, 0.3311])
>>> whiteness(xy=xy, Y=Y, xy_n=xy_n)  # doctest: +ELLIPSIS
array([ 93.85...,  -1.305...])
>>> XYZ = np.array([95.00000000, 100.00000000, 105.00000000])
>>> XYZ_0 = np.array([94.80966767, 100.00000000, 107.30513595])
>>> method = 'Taube 1960'
>>> whiteness(XYZ=XYZ, XYZ_0=XYZ_0, method=method)  # doctest: +ELLIPSIS
91.4071738...