# Colorimetry¶

## Spectral Data Structure¶

colour

 SpectralPowerDistribution([data, domain]) Defines the spectral power distribution: the base object for spectral computations. MultiSpectralPowerDistribution([data, …]) Defines multi-spectral power distribution: the base object for multi spectral computations. SpectralShape([start, end, interval]) Defines the base object for spectral power distribution shape. DEFAULT_SPECTRAL_SHAPE Default spectral shape according to ASTM E308-15 practise shape. ASTME30815_PRACTISE_SHAPE Shape for *ASTM E308-15 practise* – (360, 780, 1).

## Spectral Data Generation¶

colour

 blackbody_spd(temperature[, shape, c1, c2, n]) Returns the spectral power distribution of the planckian radiator for given temperature $$T[K]$$. CIE_standard_illuminant_A_function(wl) CIE Standard Illuminant A is intended to represent typical, domestic, tungsten-filament lighting. D_illuminant_relative_spd(xy[, M1_M2_rounding]) Returns the relative spectral power distribution of given CIE Standard Illuminant D Series using given xy chromaticity coordinates. constant_spd(k[, shape, dtype]) Returns a spectral power distribution of given spectral shape filled with constant $$k$$ values. ones_spd([shape]) Returns a spectral power distribution of given spectral shape filled with ones. zeros_spd([shape]) Returns a spectral power distribution of given spectral shape filled with zeros.

colour.colorimetry

 blackbody_spectral_radiance(wavelength, …) Returns the spectral radiance of a blackbody at thermodynamic temperature $$T[K]$$ in a medium having index of refraction $$n$$. planck_law(wavelength, temperature[, c1, c2, n]) Returns the spectral radiance of a blackbody at thermodynamic temperature $$T[K]$$ in a medium having index of refraction $$n$$.

## Conversion to Tristimulus Values¶

colour

 spectral_to_XYZ(spd[, cmfs, illuminant, method]) Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions, illuminant and method. SPECTRAL_TO_XYZ_METHODS Supported spectral power distribution to CIE XYZ tristimulus values conversion methods multi_spectral_to_XYZ(msa[, shape, cmfs, …]) Converts given multi-spectral array $$msa$$ with given spectral shape to CIE XYZ tristimulus values using given colour matching functions and illuminant. MULTI_SPECTRAL_TO_XYZ_METHODS Supported multi spectral array to CIE XYZ tristimulus values conversion methods. wavelength_to_XYZ(wavelength[, cmfs]) Converts given wavelength $$\lambda$$ to CIE XYZ tristimulus values using given colour matching functions.

### ASTM E308-15¶

colour.colorimetry

 spectral_to_XYZ_ASTME30815(spd[, cmfs, …]) Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to practise ASTM E308-15 method.

Ancillary Objects

colour.colorimetry

 spectral_to_XYZ_tristimulus_weighting_factors_ASTME30815(spd) Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant using a table of tristimulus weighting factors according to practise ASTM E308-15 method. adjust_tristimulus_weighting_factors_ASTME30815(W, …) Adjusts given table of tristimulus weighting factors to account for a shorter wavelengths range of the test spectral shape compared to the reference spectral shape using practise ASTM E308-15 method: Weights at the wavelengths for which data are not available are added to the weights at the shortest and longest wavelength for which spectral data are available. lagrange_coefficients_ASTME202211([…]) Computes the Lagrange Coefficients for given interval size using practise ASTM E2022-11 method. tristimulus_weighting_factors_ASTME202211(…) Returns a table of tristimulus weighting factors for given colour matching functions and illuminant using practise ASTM E2022-11 method.

### Integration¶

colour.colorimetry

 spectral_to_XYZ_integration(spd[, cmfs, …]) Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to classical integration method. multi_spectral_to_XYZ_integration(msa, shape) Converts given multi-spectral array $$msa$$ with given spectral shape to CIE XYZ tristimulus values using given colour matching functions and illuminant.

## Spectral Bandpass Dependence Correction¶

colour

 bandpass_correction(spd[, method]) Implements spectral bandpass dependence correction on given spectral power distribution using given method. BANDPASS_CORRECTION_METHODS Supported spectral bandpass dependence correction methods.

### Stearns and Stearns (1988)¶

colour.colorimetry

 bandpass_correction_Stearns1988(spd) Implements spectral bandpass dependence correction on given spectral power distribution using Stearns and Stearns (1988) method.

## Colour Matching Functions¶

colour.colorimetry

 LMS_ConeFundamentals([data, domain, labels]) Implements support for the Stockman and Sharpe LMS cone fundamentals colour matching functions. RGB_ColourMatchingFunctions([data, domain, …]) Implements support for the CIE RGB colour matching functions. XYZ_ColourMatchingFunctions([data, domain, …]) Implements support for the CIE Standard Observers XYZ colour matching functions.

Dataset

colour

 CMFS Aggregated colour matching functions. LMS_CMFS LMS colour matching functions. RGB_CMFS CIE RGB colour matching functions. STANDARD_OBSERVERS_CMFS CIE Standard Observers XYZ colour matching functions.

## Colour Matching Functions Transformations¶

Ancillary Objects

colour.colorimetry

 RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs(…) Converts Wright & Guild 1931 2 Degree RGB CMFs colour matching functions into the CIE 1931 2 Degree Standard Observer colour matching functions. RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs(…) Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the CIE 1964 10 Degree Standard Observer colour matching functions. RGB_10_degree_cmfs_to_LMS_10_degree_cmfs(…) Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the Stockman & Sharpe 10 Degree Cone Fundamentals spectral sensitivity functions. LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs(…) Converts Stockman & Sharpe 2 Degree Cone Fundamentals colour matching functions into the CIE 2012 2 Degree Standard Observer colour matching functions. LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs(…) Converts Stockman & Sharpe 10 Degree Cone Fundamentals colour matching functions into the CIE 2012 10 Degree Standard Observer colour matching functions.

## Illuminants and Light Sources¶

Dataset

colour

 ILLUMINANTS Aggregated CIE illuminants chromaticity coordinates. ILLUMINANTS_SPDS CIE illuminants relative spectral power distributions. HUNTERLAB_ILLUMINANTS Aggregated Hunter L,a,b illuminant dataset. LIGHT_SOURCES Aggregated light sources chromaticity coordinates. LIGHT_SOURCES_SPDS Aggregated light sources spectral power distributions.

## Dominant Wavelength and Purity¶

colour

 dominant_wavelength(xy, xy_n[, cmfs, reverse]) Returns the dominant wavelength $$\lambda_d$$ for given colour stimulus $$xy$$ and the related $$xy_wl$$ first and $$xy_{cw}$$ second intersection coordinates with the spectral locus. complementary_wavelength(xy, xy_n[, cmfs]) Returns the complementary wavelength $$\lambda_c$$ for given colour stimulus $$xy$$ and the related $$xy_wl$$ first and $$xy_{cw}$$ second intersection coordinates with the spectral locus. excitation_purity(xy, xy_n[, cmfs]) Returns the excitation purity $$P_e$$ for given colour stimulus $$xy$$. colorimetric_purity(xy, xy_n[, cmfs]) Returns the colorimetric purity $$P_c$$ for given colour stimulus $$xy$$.

## Luminous Efficiency Functions¶

colour

 luminous_efficacy(spd[, lef]) Returns the luminous efficacy in $$lm\cdot W^{-1}$$ of given spectral power distribution using given luminous efficiency function. luminous_efficiency(spd[, lef]) Returns the luminous efficiency of given spectral power distribution using given luminous efficiency function. luminous_flux(spd[, lef, K_m]) Returns the luminous flux for given spectral power distribution using given luminous efficiency function. mesopic_luminous_efficiency_function(Lp[, …]) Returns the mesopic luminous efficiency function $$V_m(\lambda)$$ for given photopic luminance $$L_p$$.

Dataset

colour

 LEFS Aggregated luminous efficiency functions. PHOTOPIC_LEFS Photopic luminous efficiency functions. SCOTOPIC_LEFS Scotopic luminous efficiency functions.

## Lightness Computation¶

colour

 lightness(Y[, method]) Returns the Lightness $$L$$ using given method. LIGHTNESS_METHODS Supported Lightness computations methods.

### Glasser, Mckinney, Reilly and Schnelle (1958)¶

colour.colorimetry

 lightness_Glasser1958(Y) Returns the Lightness $$L$$ of given luminance $$Y$$ using Glasser et al.(1958) method..

### Wyszecki (1963)¶

colour.colorimetry

 lightness_Wyszecki1963(Y) Returns the Lightness $$W$$ of given luminance $$Y$$ using Wyszecki (1963) method.

### CIE 1976¶

colour.colorimetry

 lightness_CIE1976(Y[, Y_n]) Returns the Lightness $$L^*$$ of given luminance $$Y$$ using given reference white luminance $$Y_n$$ as per CIE 1976 recommendation.

### Fairchild and Wyble (2010)¶

colour.colorimetry

 lightness_Fairchild2010(Y[, epsilon]) Computes Lightness $$L_{hdr}$$ of given luminance $$Y$$ using Fairchild and Wyble (2010) method according to Michealis-Menten kinetics.

### Fairchild and Chen (2011)¶

colour.colorimetry

 lightness_Fairchild2011(Y[, epsilon, method]) Computes Lightness $$L_{hdr}$$ of given luminance $$Y$$ using Fairchild and Chen (2011) method accordingly to Michealis-Menten kinetics.

## Luminance Computation¶

colour

 luminance(LV[, method]) Returns the luminance $$Y$$ of given Lightness $$L^*$$ or given Munsell value $$V$$. LUMINANCE_METHODS Supported luminance computations methods.

### Newhall, Nickerson and Judd (1943)¶

colour.colorimetry

 luminance_Newhall1943(V) Returns the luminance $$R_Y$$ of given Munsell value $$V$$ using Newhall et al.(1943) method..

### CIE 1976¶

colour.colorimetry

 luminance_CIE1976(L_star[, Y_n]) Returns the luminance $$Y$$ of given Lightness $$L^*$$ with given reference white luminance $$Y_n$$.

### ASTM D1535-08e1¶

colour.colorimetry

 luminance_ASTMD153508(V) Returns the luminance $$Y$$ of given Munsell value $$V$$ using ASTM D1535-08e1 method.

### Fairchild and Wyble (2010)¶

colour.colorimetry

 luminance_Fairchild2010(L_hdr[, epsilon]) Computes luminance $$Y$$ of given Lightness $$L_{hdr}$$ using Fairchild and Wyble (2010) method according to Michealis-Menten kinetics.

### Fairchild and Chen (2011)¶

colour.colorimetry

 luminance_Fairchild2011(L_hdr[, epsilon, method]) Computes luminance $$Y$$ of given Lightness $$L_{hdr}$$ using Fairchild and Chen (2011) method accordingly to Michealis-Menten kinetics.

## Whiteness Computation¶

colour

 whiteness([method]) Returns the whiteness $$W$$ using given method. WHITENESS_METHODS Supported whiteness computations methods.

### Berger (1959)¶

colour.colorimetry

 whiteness_Berger1959(XYZ, XYZ_0) Returns the whiteness index $$WI$$ of given sample CIE XYZ tristimulus values using Berger (1959) method.

### Taube (1960)¶

colour.colorimetry

 whiteness_Taube1960(XYZ, XYZ_0) Returns the whiteness index $$WI$$ of given sample CIE XYZ tristimulus values using Taube (1960) method.

### Stensby (1968)¶

colour.colorimetry

 whiteness_Stensby1968(Lab) Returns the whiteness index $$WI$$ of given sample CIE L*a*b* colourspace array using Stensby (1968) method.

### ASTM E313¶

colour.colorimetry

 whiteness_ASTME313(XYZ) Returns the whiteness index $$WI$$ of given sample CIE XYZ tristimulus values using ASTM E313 method.

### Ganz and Griesser (1979)¶

colour.colorimetry

 whiteness_Ganz1979(xy, Y) Returns the whiteness index $$W$$ and tint $$T$$ of given sample xy chromaticity coordinates using Ganz and Griesser (1979) method.

### CIE 2004¶

colour.colorimetry

 whiteness_CIE2004(xy, Y, xy_n[, observer]) Returns the whiteness $$W$$ or $$W_{10}$$ and tint $$T$$ or $$T_{10}$$ of given sample xy chromaticity coordinates using CIE 2004 method.

## Yellowness Computation¶

colour

 yellowness(XYZ[, method]) Returns the yellowness $$W$$ using given method. YELLOWNESS_METHODS Supported yellowness computations methods.

### ASTM D1925¶

colour.colorimetry

 yellowness_ASTMD1925(XYZ) Returns the yellowness index $$YI$$ of given sample CIE XYZ tristimulus values using ASTM D1925 method.

### ASTM E313¶

colour.colorimetry

 yellowness_ASTME313(XYZ) Returns the yellowness index $$YI$$ of given sample CIE XYZ tristimulus values using ASTM E313 method.