colour.quality Package

Module Contents

class colour.quality.CRI_Specification[source]

Bases: colour.quality.cri.CRI_Specification

Defines the Colour Rendering Index (CRI) colour quality specification.

Parameters:
  • name (unicode) – Name of the test spectral power distribution.
  • Q_a (numeric) – Colour Rendering Index (CRI) \(Q_a\).
  • Q_as (dict) – Individual colour rendering indexes data for each sample.
  • colorimetry_data (tuple) – Colorimetry data for the test and reference computations.

Create new instance of CRI_Specification(name, Q_a, Q_as, colorimetry_data)

colour.quality.colour_rendering_index(spd_test, additional_data=False)[source]

Returns the Colour Rendering Index (CRI) \(Q_a\) of given spectral power distribution.

Parameters:
Returns:

Colour Rendering Index (CRI).

Return type:

numeric or CRI_Specification

Examples

>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> spd = ILLUMINANTS_RELATIVE_SPDS['F2']
>>> colour_rendering_index(spd)  
64.1515202...
class colour.quality.CQS_Specification[source]

Bases: colour.quality.cqs.CQS_Specification

Defines the Colour Quality Scale (CQS) colour quality specification.

Parameters:
  • name (unicode) – Name of the test spectral power distribution.
  • Q_a (numeric) – Colour quality scale \(Q_a\).
  • Q_f (numeric) – Colour fidelity scale \(Q_f\) intended to evaluate the fidelity of object colour appearances (compared to the reference illuminant of the same correlated colour temperature and illuminance).
  • Q_p (numeric) – Colour preference scale \(Q_p\) similar to colour quality scale \(Q_a\) but placing additional weight on preference of object colour appearance. This metric is based on the notion that increases in chroma are generally preferred and should be rewarded.
  • Q_g (numeric) – Gamut area scale \(Q_g\) representing the relative gamut formed by the (\(a^*\), \(b^*\)) coordinates of the 15 samples illuminated by the test light source in the CIE LAB object colourspace.
  • Q_d (numeric) – Relative gamut area scale \(Q_d\).
  • Q_as (dict) – Individual Colour Quality Scale (CQS) data for each sample.
  • colorimetry_data (tuple) – Colorimetry data for the test and reference computations.

Create new instance of CQS_Specification(name, Q_a, Q_f, Q_p, Q_g, Q_d, Q_as, colorimetry_data)

colour.quality.colour_quality_scale(spd_test, additional_data=False)[source]

Returns the Colour Quality Scale (CQS) of given spectral power distribution.

Parameters:
Returns:

Color quality scale.

Return type:

numeric or CQS_Specification

Examples

>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> spd = ILLUMINANTS_RELATIVE_SPDS['F2']
>>> colour_quality_scale(spd)  
64.6864169...