colour.quality.cri Module

Colour Rendering Index

Defines colour rendering index computation objects:

References

[1]Ohno, Y., & Davis, W. (2008). NIST CQS simulation 7.4. Retrieved from http://cie2.nist.gov/TC1-69/NIST CQS simulation 7.4.xls
class colour.quality.cri.TCS_ColorimetryData[source]

Bases: colour.quality.cri.TCS_ColorimetryData

Defines the the class holding test colour samples colorimetry data.

class colour.quality.cri.TCS_ColourQualityScaleData[source]

Bases: colour.quality.cri.TCS_ColourQualityScaleData

Defines the the class holding test colour samples colour rendering index data.

class colour.quality.cri.CRI_Specification[source]

Bases: colour.quality.cri.CRI_Specification

Defines the colour rendering index colour quality specification.

Parameters:
  • name (unicode) – Name of the test spectral power distribution.
  • Q_a (numeric) – Colour rendering index \(Q_a\).
  • Q_as (dict) – Individual colour rendering indexes data for each sample.
  • colorimetry_data (tuple) – Colorimetry data for the test and reference computations.
colour.quality.cri.colour_rendering_index(spd_test, additional_data=False)[source]

Returns the colour rendering index \(Q_a\) of given spectral power distribution.

Parameters:
  • spd_test (SpectralPowerDistribution) – Test spectral power distribution.
  • additional_data (bool, optional) – Output additional data.
Returns:

Colour rendering index.

Return type:

numeric or CRI_Specification

Examples

>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> spd = ILLUMINANTS_RELATIVE_SPDS.get('F2')
>>> colour_rendering_index(spd)  
64.1507331...
colour.quality.cri.tcs_colorimetry_data(spd_t, spd_r, spds_tcs, cmfs, chromatic_adaptation=False)[source]

Returns the test colour samples colorimetry data.

Parameters:
  • spd_t (SpectralPowerDistribution) – Test spectral power distribution.
  • spd_r (SpectralPowerDistribution) – Reference spectral power distribution.
  • spds_tcs (dict) – Test colour samples spectral power distributions.
  • cmfs (XYZ_ColourMatchingFunctions) – Standard observer colour matching functions.
  • chromatic_adaptation (bool, optional) – Perform chromatic adaptation.
Returns:

Test colour samples colorimetry data.

Return type:

list

colour.quality.cri.colour_rendering_indexes(test_data, reference_data)[source]

Returns the test colour samples rendering indexes \(Q_a\).

Parameters:
  • test_data (list) – Test data.
  • reference_data (list) – Reference data.
Returns:

Test colour samples colour rendering indexes.

Return type:

dict