colour.colorimetry.transformations Module

Colour Matching Functions Transformations

Defines various educational objects for colour matching functions transformations:

colour.colorimetry.transformations.RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs(wavelength)[source]

Converts Wright & Guild 1931 2 Degree RGB CMFs colour matching functions into the CIE 1931 2 Degree Standard Observer colour matching functions.

Parameters:wavelength (numeric or array_like) – Wavelength \(\lambda\) in nm.
Returns:CIE 1931 2 Degree Standard Observer spectral tristimulus values.
Return type:ndarray

Notes

  • Data for the CIE 1931 2 Degree Standard Observer already exists, this definition is intended for educational purpose.

References

[1]Wyszecki, G., & Stiles, W. S. (2000). Table 1(3.3.3). In Color Science: Concepts and Methods, Quantitative Data and Formulae (pp. 138–139). Wiley. ISBN:978-0471399186

Examples

>>> RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs(700)  
array([ 0.0113577...,  0.004102  ,  0.        ])
colour.colorimetry.transformations.RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs(wavelength)[source]

Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the CIE 1964 10 Degree Standard Observer colour matching functions.

Parameters:wavelength (numeric or array_like) – Wavelength \(\lambda\) in nm.
Returns:CIE 1964 10 Degree Standard Observer spectral tristimulus values.
Return type:ndarray

Notes

  • Data for the CIE 1964 10 Degree Standard Observer already exists, this definition is intended for educational purpose.

References

[2]Wyszecki, G., & Stiles, W. S. (2000). The CIE 1964 Standard Observer. In Color Science: Concepts and Methods, Quantitative Data and Formulae (p. 141). Wiley. ISBN:978-0471399186

Examples

>>> RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs(700)  
array([  9.6432150...e-03,   3.7526317...e-03,  -4.1078830...e-06])
colour.colorimetry.transformations.RGB_10_degree_cmfs_to_LMS_10_degree_cmfs(wavelength)[source]

Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the Stockman & Sharpe 10 Degree Cone Fundamentals spectral sensitivity functions.

Parameters:wavelength (numeric or array_like) – Wavelength \(\lambda\) in nm.
Returns:Stockman & Sharpe 10 Degree Cone Fundamentals spectral tristimulus values.
Return type:ndarray

Notes

  • Data for the Stockman & Sharpe 10 Degree Cone Fundamentals already exists, this definition is intended for educational purpose.

References

[3]CIE TC 1-36. (2006). CIE 170-1:2006 Fundamental Chromaticity Diagram with Physiological Axes - Part 1 (pp. 1–56). ISBN:978-3-901-90646-6

Examples

>>> RGB_10_degree_cmfs_to_LMS_10_degree_cmfs(700)  
array([ 0.0052860...,  0.0003252...,  0.        ])
colour.colorimetry.transformations.LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs(wavelength)[source]

Converts Stockman & Sharpe 2 Degree Cone Fundamentals colour matching functions into the CIE 2012 2 Degree Standard Observer colour matching functions.

Parameters:wavelength (numeric or array_like) – Wavelength \(\lambda\) in nm.
Returns:CIE 2012 2 Degree Standard Observer spectral tristimulus values.
Return type:ndarray

Notes

  • Data for the CIE 2012 2 Degree Standard Observer already exists, this definition is intended for educational purpose.

References

[4]CVRL. (n.d.). CIE (2012) 2-deg XYZ “physiologically-relevant” colour matching functions. Retrieved June 25, 2014, from http://www.cvrl.org/database/text/cienewxyz/cie2012xyz2.htm

Examples

>>> LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs(700)  
array([ 0.0109677...,  0.0041959...,  0.        ])
colour.colorimetry.transformations.LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs(wavelength)[source]

Converts Stockman & Sharpe 10 Degree Cone Fundamentals colour matching functions into the CIE 2012 10 Degree Standard Observer colour matching functions.

Parameters:wavelength (numeric or array_like) – Wavelength \(\lambda\) in nm.
Returns:CIE 2012 10 Degree Standard Observer spectral tristimulus values.
Return type:ndarray

Notes

  • Data for the CIE 2012 10 Degree Standard Observer already exists, this definition is intended for educational purpose.

References

[5]CVRL. (n.d.). CIE (2012) 10-deg XYZ “physiologically-relevant” colour matching functions. Retrieved June 25, 2014, from http://www.cvrl.org/database/text/cienewxyz/cie2012xyz10.htm

Examples

>>> LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs(700)  
array([ 0.0098162...,  0.0037761...,  0.        ])