Colorimetry

Spectral Data Structure

colour

 SpectralShape([start, end, interval]) Defines the base object for spectral distribution shape. SpectralDistribution([data, domain]) Defines the spectral distribution: the base object for spectral computations. MultiSpectralDistributions([data, domain, ...]) Defines the multi-spectral distributions: the base object for multi spectral computations.
 SPECTRAL_SHAPE_ASTME308 (360, 780, 1). SPECTRAL_SHAPE_DEFAULT (360, 780, 1).

Ancillary Objects

colour.colorimetry

 reshape_sd(sd[, shape, method]) Reshape given spectral distribution with given spectral shape. reshape_msds(sd[, shape, method]) Reshape given multi-spectral distributions with given spectral shape. Converts given spectral and multi-spectral distributions to a flat list of spectral distributions. Converts given spectral and multi-spectral distributions to multi-spectral distributions.

Spectral Data Generation

colour

 CIE Standard Illuminant A is intended to represent typical, domestic, tungsten-filament lighting. sd_CIE_illuminant_D_series(xy[, M1_M2_rounding]) Returns the spectral distribution of given CIE Illuminant D Series using given CIE xy chromaticity coordinates. sd_blackbody(temperature[, shape, c1, c2, n]) Returns the spectral distribution of the planckian radiator for given temperature $$T[K]$$ with values in watts per steradian per square metre per nanometer ($$W/sr/m^2/nm$$). sd_constant(k[, shape]) Returns a spectral distribution of given spectral shape filled with constant $$k$$ values. sd_ones([shape]) Returns a spectral distribution of given spectral shape filled with ones. sd_zeros([shape]) Returns a spectral distribution of given spectral shape filled with zeros. msds_constant(k, labels[, shape]) Returns the multi-spectral distributions with given labels and given spectral shape filled with constant $$k$$ values. msds_ones(labels[, shape]) Returns the multi-spectral distributionss with given labels and given spectral shape filled with ones. msds_zeros(labels[, shape]) Returns the multi-spectral distributionss with given labels and given spectral shape filled with zeros. SD_GAUSSIAN_METHODS Supported gaussian spectral distribution computation methods. sd_gaussian(mu_peak_wavelength, sigma_fwhm) Returns a gaussian spectral distribution of given spectral shape using given method. SD_SINGLE_LED_METHODS Supported single LED spectral distribution computation methods. sd_single_led(peak_wavelength, fwhm[, ...]) Returns a single LED spectral distribution of given spectral shape at given peak wavelength and full width at half maximum according to given method. SD_MULTI_LEDS_METHODS Supported multi LED spectral distribution computation methods. sd_multi_leds(peak_wavelengths, fwhm[, ...]) Returns a multi LED spectral distribution of given spectral shape at given peak wavelengths and full widths at half maximum according to given method.

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$$. Returns the daylight locus as CIE xy chromaticity coordinates. sd_gaussian_normal(mu, sigma[, shape]) Returns a gaussian spectral distribution of given spectral shape at given mean wavelength $$\mu$$ and standard deviation $$sigma$$. sd_gaussian_fwhm(peak_wavelength, fwhm[, shape]) Returns a gaussian spectral distribution of given spectral shape at given peak wavelength and full width at half maximum. sd_single_led_Ohno2005(peak_wavelength, fwhm) Returns a single LED spectral distribution of given spectral shape at given peak wavelength and full width at half maximum according to Ohno (2005) method. sd_multi_leds_Ohno2005(peak_wavelengths, fwhm) Returns a multi LED spectral distribution of given spectral shape at given peak wavelengths and full widths at half maximum according to Ohno (2005) method.

Aliases

colour.colorimetry

 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

 sd_to_XYZ(sd[, cmfs, illuminant, k, method]) Converts given spectral distribution to CIE XYZ tristimulus values using given colour matching functions, illuminant and method. SD_TO_XYZ_METHODS Supported spectral distribution to CIE XYZ tristimulus values conversion methods. msds_to_XYZ(msds[, cmfs, illuminant, k, method]) Converts given multi-spectral distributions to CIE XYZ tristimulus values using given colour matching functions and illuminant. MSDS_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.

Ancillary Objects

colour.colorimetry

 handle_spectral_arguments([cmfs, ...]) Handles the spectral arguments of various Colour definitions performing spectral computations.

ASTM E308-15

colour.colorimetry

 sd_to_XYZ_ASTME308(sd[, cmfs, illuminant, ...]) Converts given spectral distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to practise ASTM E308-15 method. msds_to_XYZ_ASTME308(msds[, cmfs, ...]) Converts given multi-spectral distributions to CIE XYZ tristimulus values using given colour matching functions and illuminant according to practise ASTM E308-15 method.

Ancillary Objects

colour.colorimetry

 Converts given spectral 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. 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_ASTME2022([interval, ...]) Computes the Lagrange Coefficients for given interval size using practise ASTM E2022-11 method. Returns a table of tristimulus weighting factors for given colour matching functions and illuminant using practise ASTM E2022-11 method.

Integration

colour.colorimetry

 sd_to_XYZ_integration(sd[, cmfs, ...]) Converts given spectral distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to classical integration method. msds_to_XYZ_integration(msds[, cmfs, ...]) Converts given multi-spectral distributions to CIE XYZ tristimulus values using given colour matching functions and illuminant.

Spectral Bandpass Dependence Correction

colour

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

Stearns and Stearns (1988)

colour.colorimetry

 Implements spectral bandpass dependence correction on given spectral 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

 MSDS_CMFS Multi-spectral distributions of the colour matching functions.

Ancillary Objects

colour.colorimetry

 MSDS_CMFS_LMS Multi-spectral distributions of the LMS colour matching functions. MSDS_CMFS_RGB Multi-spectral distributions of the RGB colour matching functions. MSDS_CMFS_STANDARD_OBSERVER Multi-spectral distributions of the CIE Standard Observer colour matching functions.

Colour Matching Functions Transformations

Ancillary Objects

colour.colorimetry

 Converts Wright & Guild 1931 2 Degree RGB CMFs colour matching functions into the CIE 1931 2 Degree Standard Observer colour matching functions. Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the CIE 1964 10 Degree Standard Observer colour matching functions. Converts Stiles & Burch 1959 10 Degree RGB CMFs colour matching functions into the Stockman & Sharpe 10 Degree Cone Fundamentals spectral sensitivity functions. Converts Stockman & Sharpe 2 Degree Cone Fundamentals colour matching functions into the CIE 2012 2 Degree Standard Observer colour matching functions. 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

 CCS_ILLUMINANTS Chromaticity coordinates of the illuminants. SDS_ILLUMINANTS Spectral distributions of the illuminants. CCS_LIGHT_SOURCES Chromaticity coordinates of the light sources. SDS_LIGHT_SOURCES Spectral distributions of the light sources. TVS_ILLUMINANTS CIE XYZ tristimulus values of the illuminants. TVS_ILLUMINANTS_HUNTERLAB CIE XYZ tristimulus values of the HunterLab illuminants.

Ancillary Objects

colour.colorimetry

 SDS_BASIS_FUNCTIONS_CIE_ILLUMINANT_D_SERIES CIE Illuminant D Series $$S_n(\lambda)$$ spectral distributions.

Dominant Wavelength and Purity

colour

 dominant_wavelength(xy, xy_n[, cmfs, inverse]) 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(sd[, lef]) Returns the luminous efficacy in $$lm\cdot W^{-1}$$ of given spectral distribution using given luminous efficiency function. luminous_efficiency(sd[, lef]) Returns the luminous efficiency of given spectral distribution using given luminous efficiency function. luminous_flux(sd[, lef, K_m]) Returns the luminous flux for given spectral distribution using given luminous efficiency function. Returns the mesopic luminous efficiency function $$V_m(\lambda)$$ for given photopic luminance $$L_p$$.

Dataset

colour

 SDS_LEFS Spectral distributions of the luminous efficiency functions.

Ancillary Objects

colour.colorimetry

 SDS_LEFS_PHOTOPIC Spectral distributions of the photopic luminous efficiency functions. SDS_LEFS_SCOTOPIC Spectral distributions of the scotopic luminous efficiency functions.

Spectral Uniformity

colour

spectral_uniformity

Lightness Computation

colour

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

Glasser, Mckinney, Reilly and Schnelle (1958)

colour.colorimetry

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

Wyszecki (1963)

colour.colorimetry

 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. Returns the intermediate value $$f(Y/Yn)$$ in the Lightness $$L^*$$ computation for 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 Michaelis-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 according to Michaelis-Menten kinetics.

Abebe, Pouli, Larabi and Reinhard (2017)

colour.colorimetry

 lightness_Abebe2017(Y[, Y_n, method]) Computes Lightness $$L$$ of given luminance $$Y$$ using Abebe, Pouli, Larabi and Reinhard (2017) method according to Michaelis-Menten kinetics or Stevens's Power Law.

Luminance Computation

colour

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

Newhall, Nickerson and Judd (1943)

colour.colorimetry

 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$$. Returns the luminance $$Y$$ in the luminance $$Y$$ computation for given intermediate value $$f(Y/Yn)$$ using given reference white luminance $$Y_n$$ as per CIE 1976 recommendation.

ASTM D1535-08e1

colour.colorimetry

 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 Michaelis-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 according to Michaelis-Menten kinetics.

Whiteness Computation

colour

 whiteness(XYZ, XYZ_0[, method]) Returns the whiteness $$W$$ using given method. WHITENESS_METHODS Supported whiteness computation 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

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

ASTM E313

colour.colorimetry

 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 CIE 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 CIE xy chromaticity coordinates using CIE 2004 method.

Yellowness Computation

colour

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

ASTM D1925

colour.colorimetry

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

ASTM E313

colour.colorimetry

 Returns the yellowness index $$YI$$ of given sample CIE XYZ tristimulus values using the alternative ASTM E313 method. YELLOWNESS_COEFFICIENTS_ASTME313 Coefficients $$C_X$$ and $$C_Z$$ for the ASTM E313 yellowness index $$YI$$ computation method. yellowness_ASTME313(XYZ[, C_XZ]) Returns the yellowness index $$YI$$ of given sample CIE XYZ tristimulus values using ASTM E313 method.