# colour.colorimetry.whiteness Module¶

## Whiteness Index $$W$$¶

Defines whiteness index $$W$$ computation objects:

References

 [1] Wikipedia. (n.d.). Whiteness. Retrieved September 17, 2014, from http://en.wikipedia.org/wiki/Whiteness
 [2] (1, 2, 3, 4, 5, 6) X-Rite, & Pantone. (2012). Color iQC and Color iMatch Color Calculations Guide. Retrieved from http://www.xrite.com/documents/literature/en/09_Color_Calculations_en.pdf
 [3] Wyszecki, G., & Stiles, W. S. (2000). Table I(6.5.3) Whiteness Formulae (Whiteness Measure Denoted by W). In Color Science: Concepts and Methods, Quantitative Data and Formulae (pp. 837–839). Wiley. ISBN:978-0471399186
colour.colorimetry.whiteness.whiteness_Berger1959(XYZ, XYZ_0)[source]

Returns the whiteness index $$WI$$ of given sample CIE XYZ tristimulus values using Berger (1959) method. [2]

Parameters: XYZ (array_like) – CIE XYZ tristimulus values of sample. XYZ_0 (array_like) – CIE XYZ tristimulus values of reference white. Whiteness $$WI$$. numeric or ndarray

Notes

• Input CIE XYZ and CIE XYZ_0 tristimulus values are in domain [0, 100].
• Whiteness $$WI$$ values larger than 33.33 indicate a bluish white and values smaller than 33.33 indicate a yellowish white.

Warning

The input domain of that definition is non standard!

Examples

>>> XYZ = np.array([95.00000000, 100.00000000, 105.00000000])
>>> XYZ_0 = np.array([94.80966767, 100.00000000, 107.30513595])
>>> whiteness_Berger1959(XYZ, XYZ_0)
30.3638017...

colour.colorimetry.whiteness.whiteness_Taube1960(XYZ, XYZ_0)[source]

Returns the whiteness index $$WI$$ of given sample CIE XYZ tristimulus values using Taube (1960) method. [2]

Parameters: XYZ (array_like) – CIE XYZ tristimulus values of sample. XYZ_0 (array_like) – CIE XYZ tristimulus values of reference white. Whiteness $$WI$$. numeric or ndarray

Notes

• Input CIE XYZ and CIE XYZ_0 tristimulus values are in domain [0, 100].
• Whiteness $$WI$$ values larger than 100 indicate a bluish white and values smaller than 100 indicate a yellowish white.

Examples

>>> XYZ = np.array([95.00000000, 100.00000000, 105.00000000])
>>> XYZ_0 = np.array([94.80966767, 100.00000000, 107.30513595])
>>> whiteness_Taube1960(XYZ, XYZ_0)
91.4071738...

colour.colorimetry.whiteness.whiteness_Stensby1968(Lab)[source]

Returns the whiteness index $$WI$$ of given sample CIE Lab colourspace array using Stensby (1968) method. [2]

Parameters: Lab (array_like) – CIE Lab colourspace array of sample. Whiteness $$WI$$. numeric or ndarray

Notes

• Input CIE Lab colourspace array is in domain [0, 100].
• Whiteness $$WI$$ values larger than 100 indicate a bluish white and values smaller than 100 indicate a yellowish white.

Examples

>>> Lab = np.array([100.00000000, -2.46875131, -16.72486654])
>>> whiteness_Stensby1968(Lab)
142.7683456...

colour.colorimetry.whiteness.whiteness_ASTME313(XYZ)[source]

Returns the whiteness index $$WI$$ of given sample CIE XYZ tristimulus values using ASTM E313 method. [2]

Parameters: XYZ (array_like) – CIE XYZ tristimulus values of sample. Whiteness $$WI$$. numeric or ndarray

Notes

• Input CIE XYZ tristimulus values are in domain [0, 100].

Warning

The input domain of that definition is non standard!

Examples

>>> XYZ = np.array([95.00000000, 100.00000000, 105.00000000])
>>> whiteness_ASTME313(XYZ)
55.7400000...

colour.colorimetry.whiteness.whiteness_Ganz1979(xy, Y)[source]

Returns the whiteness index $$W$$ and tint $$T$$ of given sample xy chromaticity coordinates using Ganz and Griesser (1979) method. [2]

Parameters: xy (array_like) – Chromaticity coordinates xy of sample. Y (numeric or array_like) – Tristimulus $$Y$$ value of sample. Whiteness $$W$$ and tint $$T$$. ndarray

Notes

• Input tristimulus $$Y$$ value is in domain [0, 100].
• The formula coefficients are valid for CIE Standard Illuminant D Series D65 and CIE 1964 10 Degree Standard Observer.
• Positive output tint $$T$$ values indicate a greener tint while negative values indicate a redder tint.
• Whiteness differences of less than 5 Ganz units appear to be indistinguishable to the human eye.
• Tint differences of less than 0.5 Ganz units appear to be indistinguishable to the human eye.

Warning

The input domain of that definition is non standard!

Examples

>>> xy = np.array([0.3167, 0.3334])
>>> whiteness_Ganz1979(xy, 100)
array([ 85.6003766...,   0.6789003...])

colour.colorimetry.whiteness.whiteness_CIE2004(xy, Y, xy_n, observer=u'CIE 1931 2 Degree Standard Observer')[source]

Returns the whiteness $$W$$ or $$W_{10}$$ and tint $$T$$ or $$T_{10}$$ of given sample xy chromaticity coordinates using CIE 2004 method.

Parameters: xy (array_like) – Chromaticity coordinates xy of sample. Y (numeric or array_like) – Tristimulus $$Y$$ value of sample. xy_n (array_like) – Chromaticity coordinates xy_n of perfect diffuser. observer (unicode, optional) – {‘CIE 1931 2 Degree Standard Observer’, ‘CIE 1964 10 Degree Standard Observer’}, CIE Standard Observer used for computations, tint $$T$$ or $$T_{10}$$ value is dependent on viewing field angular subtense. Whiteness $$W$$ or $$W_{10}$$ and tint $$T$$ or $$T_{10}$$ of given sample. ndarray

Notes

• Input tristimulus $$Y$$ value is in domain [0, 100].
• This method may be used only for samples whose values of $$W$$ or $$W_{10}$$ lie within the following limits: greater than 40 and less than 5Y - 280, or 5Y10 - 280.
• This method may be used only for samples whose values of $$T$$ or $$T_{10}$$ lie within the following limits: greater than -4 and less than +2.
• Output whiteness $$W$$ or $$W_{10}$$ values larger than 100 indicate a bluish white while values smaller than 100 indicate a yellowish white. [2]
• Positive output tint $$T$$ or $$T_{10}$$ values indicate a greener tint while negative values indicate a redder tint.

Warning

The input domain of that definition is non standard!

References

 [4] CIE TC 1-48. (2004). The evaluation of whiteness. In CIE 015:2004 Colorimetry, 3rd Edition (p. 24). ISBN:978-3-901-90633-6

Examples

>>> xy = np.array([0.3167, 0.3334])
>>> xy_n = np.array([0.3139, 0.3311])
>>> whiteness_CIE2004(xy, 100, xy_n)
array([ 93.85...,  -1.305...])

colour.colorimetry.whiteness.WHITENESS_METHODS = CaseInsensitiveMapping({u'ASTM E313': <function whiteness_ASTME313>, u'Ganz 1979': <function whiteness_Ganz1979>, u'Stensby 1968': <function whiteness_Stensby1968>, u'Taube 1960': <function whiteness_Taube1960>, u'Berger 1959': <function whiteness_Berger1959>, u'CIE 2004': <function whiteness_CIE2004>, u'cie2004': <function whiteness_CIE2004>})

Supported whiteness computations methods.

WHITENESS_METHODS : CaseInsensitiveMapping
{‘CIE 2004’, ‘Berger 1959’, ‘Taube 1960’, ‘Stensby 1968’, ‘ASTM E313’, ‘Ganz 1979’, ‘CIE 2004’}

Aliases:

• ‘cie2004’: ‘CIE 2004’
colour.colorimetry.whiteness.whiteness(method=u'CIE 2004', **kwargs)[source]

Returns the whiteness $$W$$ using given method.

Parameters: Other Parameters: method (unicode, optional) – {‘CIE 2004’, ‘Berger 1959’, ‘Taube 1960’, ‘Stensby 1968’, ‘ASTM E313’, ‘Ganz 1979’, ‘CIE 2004’}, Computation method. XYZ (array_like) – {whiteness_Berger1959(), whiteness_Taube1960(), whiteness_ASTME313()}, CIE XYZ tristimulus values of sample. XYZ_0 (array_like) – {whiteness_Berger1959(), whiteness_Taube1960()}, CIE XYZ tristimulus values of reference white. Lab (array_like) – {whiteness_Stensby1968()}, CIE Lab colourspace array of sample. xy (array_like) – {whiteness_Ganz1979(), whiteness_CIE2004()}, Chromaticity coordinates xy of sample. Y (numeric or array_like) – {whiteness_Ganz1979(), whiteness_CIE2004()}, Tristimulus $$Y$$ value of sample. xy_n (array_like) – {whiteness_CIE2004()}, Chromaticity coordinates xy_n of perfect diffuser. observer (unicode, optional) – {whiteness_CIE2004()}, {‘CIE 1931 2 Degree Standard Observer’, ‘CIE 1964 10 Degree Standard Observer’}, CIE Standard Observer used for computations, tint $$T$$ or $$T_{10}$$ value is dependent on viewing field angular subtense. whiteness $$W$$. numeric or ndarray

Examples

>>> 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)
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)
91.4071738...