Colour Science for Python

_images/Logo_Medium_001.png

Colour is a Python colour science package implementing a comprehensive number of colour theory transformations and algorithms.

It is open source and freely available under the New BSD License terms.

Draft Release Notes

The draft release notes from the develop branch are available at this url.

Features

Colour features a rich dataset and collection of objects, please see the features page for more information.

Installation

Anaconda from Continuum Analytics is the Python distribution we use to develop Colour: it ships all the scientific dependencies we require and is easily deployed cross-platform:

$ conda create -y -n python-colour
$ source activate python-colour
$ conda install -y -c conda-forge colour-science

Colour can be easily installed from the Python Package Index by issuing this command in a shell:

$ pip install colour-science

The detailed installation procedure is described in the Installation Guide.

Usage

The two main references for Colour usage are the Colour Manual and the Jupyter Notebooks with detailed historical and theoretical context and images.

Colour Manual

Tutorial

Colour spreads over various domains of Colour Science, from colour models to optical phenomena, this tutorial does not give a complete overview of the API but is a good introduction to the main concepts.

Note

A directory with examples is available at this path in Colour installation: colour/examples. It can be explored directly on Github: https://github.com/colour-science/colour/tree/master/colour/examples

from colour.plotting import *

colour_style()

plot_visible_spectrum()
_images/Tutorial_Visible_Spectrum.png
Overview

Colour is organised around various sub-packages:

  • adaptation: Chromatic adaptation models and transformations.
  • algebra: Algebra utilities.
  • appearance: Colour appearance models.
  • biochemistry: Biochemistry computations.
  • blindness: Colour vision deficiency models.
  • continuous: Base objects for continuous data representation.
  • contrast: Objects for contrast sensitivity computation.
  • characterisation: Colour fitting and camera characterisation.
  • colorimetry: Core objects for colour computations.
  • constants: CIE and CODATA constants.
  • corresponding: Corresponding colour chromaticities computations.
  • difference: Colour difference computations.
  • examples: Examples for the sub-packages.
  • io: Input / output objects for reading and writing data.
  • models: Colour models.
  • notation: Colour notation systems.
  • phenomena: Computation of various optical phenomena.
  • plotting: Diagrams, figures, etc…
  • quality: Colour quality computation.
  • recovery: Reflectance recovery.
  • temperature: Colour temperature and correlated colour temperature computation.
  • utilities: Various utilities and data structures.
  • volume: Colourspace volumes computation and optimal colour stimuli.

Most of the public API is available from the root colour namespace:

import colour

print(colour.__all__[:5] + ['...'])
['domain_range_scale', 'get_domain_range_scale', 'set_domain_range_scale', 'CHROMATIC_ADAPTATION_METHODS', 'CHROMATIC_ADAPTATION_TRANSFORMS', '...']

The various sub-packages also expose their public API:

from pprint import pprint

import colour.plotting

for sub_package in ('adaptation', 'algebra', 'appearance', 'biochemistry',
                    'blindness', 'characterisation', 'colorimetry',
                    'constants', 'continuous', 'contrast', 'corresponding',
                    'difference', 'io', 'models', 'notation', 'phenomena',
                    'plotting', 'quality', 'recovery', 'temperature',
                    'utilities', 'volume'):
    print(sub_package.title())
    pprint(getattr(colour, sub_package).__all__[:5] + ['...'])
    print('\n')
Adaptation
['CHROMATIC_ADAPTATION_TRANSFORMS',
 'XYZ_SCALING_CAT',
 'VON_KRIES_CAT',
 'BRADFORD_CAT',
 'SHARP_CAT',
 '...']


Algebra
['cartesian_to_spherical',
 'spherical_to_cartesian',
 'cartesian_to_polar',
 'polar_to_cartesian',
 'cartesian_to_cylindrical',
 '...']


Appearance
['Hunt_InductionFactors',
 'HUNT_VIEWING_CONDITIONS',
 'Hunt_Specification',
 'XYZ_to_Hunt',
 'ATD95_Specification',
 '...']


Biochemistry
['reaction_rate_MichealisMenten',
 'substrate_concentration_MichealisMenten',
 '...']


Blindness
['CVD_MATRICES_MACHADO2010',
 'anomalous_trichromacy_cmfs_Machado2009',
 'anomalous_trichromacy_matrix_Machado2009',
 'cvd_matrix_Machado2009',
 '...']


Characterisation
['RGB_SpectralSensitivities',
 'RGB_DisplayPrimaries',
 'CAMERAS_RGB_SPECTRAL_SENSITIVITIES',
 'COLOURCHECKERS',
 'ColourChecker',
 '...']


Colorimetry
['SpectralShape',
 'DEFAULT_SPECTRAL_SHAPE',
 'SpectralDistribution',
 'MultiSpectralDistribution',
 'sd_blackbody',
 '...']


Constants
['K_M', 'KP_M', 'AVOGADRO_CONSTANT', 'BOLTZMANN_CONSTANT', 'LIGHT_SPEED', '...']


Continuous
['AbstractContinuousFunction', 'Signal', 'MultiSignal', '...']


Contrast
['optical_MTF_Barten1999',
 'pupil_diameter_Barten1999',
 'sigma_Barten1999',
 'retinal_illuminance_Barten1999',
 'maximum_angular_size_Barten1999',
 '...']


Corresponding
['BRENEMAN_EXPERIMENTS',
 'BRENEMAN_EXPERIMENTS_PRIMARIES_CHROMATICITIES',
 'corresponding_chromaticities_prediction_CIE1994',
 'corresponding_chromaticities_prediction_CMCCAT2000',
 'corresponding_chromaticities_prediction_Fairchild1990',
 '...']


Difference
['delta_E_CAM02LCD',
 'delta_E_CAM02SCD',
 'delta_E_CAM02UCS',
 'delta_E_CAM16LCD',
 'delta_E_CAM16SCD',
 '...']


Io
['SpectralDistribution_IESTM2714',
 'AbstractLUTSequenceOperator',
 'LUT1D',
 'LUT3x1D',
 'LUT3D',
 '...']


Models
['JMh_CIECAM02_to_CAM02LCD',
 'CAM02LCD_to_JMh_CIECAM02',
 'JMh_CIECAM02_to_CAM02SCD',
 'CAM02SCD_to_JMh_CIECAM02',
 'JMh_CIECAM02_to_CAM02UCS',
 '...']


Notation
['MUNSELL_COLOURS_ALL',
 'MUNSELL_COLOURS_1929',
 'MUNSELL_COLOURS_REAL',
 'MUNSELL_COLOURS',
 'munsell_value',
 '...']


Phenomena
['scattering_cross_section',
 'rayleigh_optical_depth',
 'rayleigh_scattering',
 'sd_rayleigh_scattering',
 '...']


Plotting
['ASTM_G_173_ETR',
 'ASTM_G_173_GLOBAL_TILT',
 'ASTM_G_173_DIRECT_CIRCUMSOLAR',
 'COLOUR_STYLE_CONSTANTS',
 'COLOUR_ARROW_STYLE',
 '...']


Quality
['TCS_SDS',
 'VS_SDS',
 'CRI_Specification',
 'colour_rendering_index',
 'CQS_Specification',
 '...']


Recovery
['SMITS_1999_SDS',
 'XYZ_to_sd_Meng2015',
 'RGB_to_sd_Smits1999',
 'XYZ_TO_SD_METHODS',
 'XYZ_to_sd',
 '...']


Temperature
['CCT_TO_UV_METHODS',
 'UV_TO_CCT_METHODS',
 'CCT_to_uv',
 'CCT_to_uv_Ohno2013',
 'CCT_to_uv_Robertson1968',
 '...']


Utilities
['Lookup',
 'Structure',
 'CaseInsensitiveMapping',
 'handle_numpy_errors',
 'ignore_numpy_errors',
 '...']


Volume
['ILLUMINANTS_OPTIMAL_COLOUR_STIMULI',
 'is_within_macadam_limits',
 'is_within_mesh_volume',
 'is_within_pointer_gamut',
 'generate_pulse_waves',
 '...']

The codebase is documented and most docstrings have usage examples:

print(colour.temperature.CCT_to_uv_Ohno2013.__doc__)
Returns the *CIE UCS* colourspace *uv* chromaticity coordinates from given
correlated colour temperature :math:`T_{cp}`, :math:`\Delta_{uv}` and
colour matching functions using *Ohno (2013)* method.

Parameters
----------
CCT : numeric
    Correlated colour temperature :math:`T_{cp}`.
D_uv : numeric, optional
    :math:`\Delta_{uv}`.
cmfs : XYZ_ColourMatchingFunctions, optional
    Standard observer colour matching functions.

Returns
-------
ndarray
    *CIE UCS* colourspace *uv* chromaticity coordinates.

References
----------
:cite:`Ohno2014a`

Examples
--------
>>> from colour import STANDARD_OBSERVERS_CMFS
>>> cmfs = STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer']
>>> CCT = 6507.4342201047066
>>> D_uv = 0.003223690901513
>>> CCT_to_uv_Ohno2013(CCT, D_uv, cmfs)  # doctest: +ELLIPSIS
array([ 0.1977999...,  0.3122004...])

At the core of Colour is the colour.colorimetry sub-package, it defines the objects needed for spectral computations and many others:

import colour.colorimetry as colorimetry

pprint(colorimetry.__all__)
['SpectralShape',
 'DEFAULT_SPECTRAL_SHAPE',
 'SpectralDistribution',
 'MultiSpectralDistribution',
 'sd_blackbody',
 'blackbody_spectral_radiance',
 'planck_law',
 'LMS_ConeFundamentals',
 'RGB_ColourMatchingFunctions',
 'XYZ_ColourMatchingFunctions',
 'CMFS',
 'LMS_CMFS',
 'RGB_CMFS',
 'STANDARD_OBSERVERS_CMFS',
 'ILLUMINANTS',
 'D_ILLUMINANTS_S_SDS',
 'HUNTERLAB_ILLUMINANTS',
 'ILLUMINANTS_SDS',
 'LIGHT_SOURCES',
 'LIGHT_SOURCES_SDS',
 'LEFS',
 'PHOTOPIC_LEFS',
 'SCOTOPIC_LEFS',
 'sd_constant',
 'sd_zeros',
 'sd_ones',
 'SD_GAUSSIAN_METHODS',
 'sd_gaussian',
 'sd_gaussian_normal',
 'sd_gaussian_fwhm',
 'SD_SINGLE_LED_METHODS',
 'sd_single_led',
 'sd_single_led_Ohno2005',
 'SD_MULTI_LEDS_METHODS',
 'sd_multi_leds',
 'sd_multi_leds_Ohno2005',
 'SD_TO_XYZ_METHODS',
 'MULTI_SD_TO_XYZ_METHODS',
 'sd_to_XYZ',
 'multi_sds_to_XYZ',
 'ASTME30815_PRACTISE_SHAPE',
 'lagrange_coefficients_ASTME202211',
 'tristimulus_weighting_factors_ASTME202211',
 'adjust_tristimulus_weighting_factors_ASTME30815',
 'sd_to_XYZ_integration',
 'sd_to_XYZ_tristimulus_weighting_factors_ASTME30815',
 'sd_to_XYZ_ASTME30815',
 'multi_sds_to_XYZ_integration',
 'wavelength_to_XYZ',
 'BANDPASS_CORRECTION_METHODS',
 'bandpass_correction',
 'bandpass_correction_Stearns1988',
 'sd_CIE_standard_illuminant_A',
 'sd_CIE_illuminant_D_series',
 'daylight_locus_function',
 'sd_mesopic_luminous_efficiency_function',
 'mesopic_weighting_function',
 'LIGHTNESS_METHODS',
 'lightness',
 'lightness_Glasser1958',
 'lightness_Wyszecki1963',
 'lightness_CIE1976',
 'lightness_Fairchild2010',
 'lightness_Fairchild2011',
 'intermediate_lightness_function_CIE1976',
 'LUMINANCE_METHODS',
 'luminance',
 'luminance_Newhall1943',
 'luminance_ASTMD153508',
 'luminance_CIE1976',
 'luminance_Fairchild2010',
 'luminance_Fairchild2011',
 'intermediate_luminance_function_CIE1976',
 'dominant_wavelength',
 'complementary_wavelength',
 'excitation_purity',
 'colorimetric_purity',
 'luminous_flux',
 'luminous_efficiency',
 'luminous_efficacy',
 'RGB_10_degree_cmfs_to_LMS_10_degree_cmfs',
 'RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs',
 'RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs',
 'LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs',
 'LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs',
 'WHITENESS_METHODS',
 'whiteness',
 'whiteness_Berger1959',
 'whiteness_Taube1960',
 'whiteness_Stensby1968',
 'whiteness_ASTME313',
 'whiteness_Ganz1979',
 'whiteness_CIE2004',
 'YELLOWNESS_METHODS',
 'yellowness',
 'yellowness_ASTMD1925',
 'yellowness_ASTME313']

Colour computations leverage a comprehensive dataset available in most sub-packages, for example the colour.colorimetry.dataset defines the following components:

import colour.colorimetry.dataset as dataset

pprint(dataset.__all__)
['CMFS',
 'LMS_CMFS',
 'RGB_CMFS',
 'STANDARD_OBSERVERS_CMFS',
 'ILLUMINANTS',
 'D_ILLUMINANTS_S_SDS',
 'HUNTERLAB_ILLUMINANTS',
 'ILLUMINANTS_SDS',
 'LIGHT_SOURCES',
 'LIGHT_SOURCES_SDS',
 'LEFS',
 'PHOTOPIC_LEFS',
 'SCOTOPIC_LEFS']
From Spectral Distribution

Whether it be a sample spectral distribution, colour matching functions or illuminants, spectral data is manipulated using an object built with the colour.SpectralDistribution class or based on it:

# Defining a sample spectral distribution data.
sample_sd_data = {
    380: 0.048,
    385: 0.051,
    390: 0.055,
    395: 0.060,
    400: 0.065,
    405: 0.068,
    410: 0.068,
    415: 0.067,
    420: 0.064,
    425: 0.062,
    430: 0.059,
    435: 0.057,
    440: 0.055,
    445: 0.054,
    450: 0.053,
    455: 0.053,
    460: 0.052,
    465: 0.052,
    470: 0.052,
    475: 0.053,
    480: 0.054,
    485: 0.055,
    490: 0.057,
    495: 0.059,
    500: 0.061,
    505: 0.062,
    510: 0.065,
    515: 0.067,
    520: 0.070,
    525: 0.072,
    530: 0.074,
    535: 0.075,
    540: 0.076,
    545: 0.078,
    550: 0.079,
    555: 0.082,
    560: 0.087,
    565: 0.092,
    570: 0.100,
    575: 0.107,
    580: 0.115,
    585: 0.122,
    590: 0.129,
    595: 0.134,
    600: 0.138,
    605: 0.142,
    610: 0.146,
    615: 0.150,
    620: 0.154,
    625: 0.158,
    630: 0.163,
    635: 0.167,
    640: 0.173,
    645: 0.180,
    650: 0.188,
    655: 0.196,
    660: 0.204,
    665: 0.213,
    670: 0.222,
    675: 0.231,
    680: 0.242,
    685: 0.251,
    690: 0.261,
    695: 0.271,
    700: 0.282,
    705: 0.294,
    710: 0.305,
    715: 0.318,
    720: 0.334,
    725: 0.354,
    730: 0.372,
    735: 0.392,
    740: 0.409,
    745: 0.420,
    750: 0.436,
    755: 0.450,
    760: 0.462,
    765: 0.465,
    770: 0.448,
    775: 0.432,
    780: 0.421}

sd = colour.SpectralDistribution(sample_sd_data, name='Sample')
print(repr(sd))
SpectralDistribution([[  3.80000000e+02,   4.80000000e-02],
                      [  3.85000000e+02,   5.10000000e-02],
                      [  3.90000000e+02,   5.50000000e-02],
                      [  3.95000000e+02,   6.00000000e-02],
                      [  4.00000000e+02,   6.50000000e-02],
                      [  4.05000000e+02,   6.80000000e-02],
                      [  4.10000000e+02,   6.80000000e-02],
                      [  4.15000000e+02,   6.70000000e-02],
                      [  4.20000000e+02,   6.40000000e-02],
                      [  4.25000000e+02,   6.20000000e-02],
                      [  4.30000000e+02,   5.90000000e-02],
                      [  4.35000000e+02,   5.70000000e-02],
                      [  4.40000000e+02,   5.50000000e-02],
                      [  4.45000000e+02,   5.40000000e-02],
                      [  4.50000000e+02,   5.30000000e-02],
                      [  4.55000000e+02,   5.30000000e-02],
                      [  4.60000000e+02,   5.20000000e-02],
                      [  4.65000000e+02,   5.20000000e-02],
                      [  4.70000000e+02,   5.20000000e-02],
                      [  4.75000000e+02,   5.30000000e-02],
                      [  4.80000000e+02,   5.40000000e-02],
                      [  4.85000000e+02,   5.50000000e-02],
                      [  4.90000000e+02,   5.70000000e-02],
                      [  4.95000000e+02,   5.90000000e-02],
                      [  5.00000000e+02,   6.10000000e-02],
                      [  5.05000000e+02,   6.20000000e-02],
                      [  5.10000000e+02,   6.50000000e-02],
                      [  5.15000000e+02,   6.70000000e-02],
                      [  5.20000000e+02,   7.00000000e-02],
                      [  5.25000000e+02,   7.20000000e-02],
                      [  5.30000000e+02,   7.40000000e-02],
                      [  5.35000000e+02,   7.50000000e-02],
                      [  5.40000000e+02,   7.60000000e-02],
                      [  5.45000000e+02,   7.80000000e-02],
                      [  5.50000000e+02,   7.90000000e-02],
                      [  5.55000000e+02,   8.20000000e-02],
                      [  5.60000000e+02,   8.70000000e-02],
                      [  5.65000000e+02,   9.20000000e-02],
                      [  5.70000000e+02,   1.00000000e-01],
                      [  5.75000000e+02,   1.07000000e-01],
                      [  5.80000000e+02,   1.15000000e-01],
                      [  5.85000000e+02,   1.22000000e-01],
                      [  5.90000000e+02,   1.29000000e-01],
                      [  5.95000000e+02,   1.34000000e-01],
                      [  6.00000000e+02,   1.38000000e-01],
                      [  6.05000000e+02,   1.42000000e-01],
                      [  6.10000000e+02,   1.46000000e-01],
                      [  6.15000000e+02,   1.50000000e-01],
                      [  6.20000000e+02,   1.54000000e-01],
                      [  6.25000000e+02,   1.58000000e-01],
                      [  6.30000000e+02,   1.63000000e-01],
                      [  6.35000000e+02,   1.67000000e-01],
                      [  6.40000000e+02,   1.73000000e-01],
                      [  6.45000000e+02,   1.80000000e-01],
                      [  6.50000000e+02,   1.88000000e-01],
                      [  6.55000000e+02,   1.96000000e-01],
                      [  6.60000000e+02,   2.04000000e-01],
                      [  6.65000000e+02,   2.13000000e-01],
                      [  6.70000000e+02,   2.22000000e-01],
                      [  6.75000000e+02,   2.31000000e-01],
                      [  6.80000000e+02,   2.42000000e-01],
                      [  6.85000000e+02,   2.51000000e-01],
                      [  6.90000000e+02,   2.61000000e-01],
                      [  6.95000000e+02,   2.71000000e-01],
                      [  7.00000000e+02,   2.82000000e-01],
                      [  7.05000000e+02,   2.94000000e-01],
                      [  7.10000000e+02,   3.05000000e-01],
                      [  7.15000000e+02,   3.18000000e-01],
                      [  7.20000000e+02,   3.34000000e-01],
                      [  7.25000000e+02,   3.54000000e-01],
                      [  7.30000000e+02,   3.72000000e-01],
                      [  7.35000000e+02,   3.92000000e-01],
                      [  7.40000000e+02,   4.09000000e-01],
                      [  7.45000000e+02,   4.20000000e-01],
                      [  7.50000000e+02,   4.36000000e-01],
                      [  7.55000000e+02,   4.50000000e-01],
                      [  7.60000000e+02,   4.62000000e-01],
                      [  7.65000000e+02,   4.65000000e-01],
                      [  7.70000000e+02,   4.48000000e-01],
                      [  7.75000000e+02,   4.32000000e-01],
                      [  7.80000000e+02,   4.21000000e-01]],
                     interpolator=SpragueInterpolator,
                     interpolator_args={},
                     extrapolator=Extrapolator,
                     extrapolator_args={u'right': None, u'method': u'Constant', u'left': None})

The sample spectral distribution can be easily plotted against the visible spectrum:

# Plotting the sample spectral distribution.
plot_single_sd(sd)
_images/Tutorial_Sample_SD.png

With the sample spectral distribution defined, its shape is retrieved as follows:

# Displaying the sample spectral distribution shape.
print(sd.shape)
(380.0, 780.0, 5.0)

The returned shape is an instance of the colour.SpectralShape class:

repr(sd.shape)
'SpectralShape(380.0, 780.0, 5.0)'

colour.SpectralShape is used throughout Colour to define spectral dimensions and is instantiated as follows:

# Using *colour.SpectralShape* with iteration.
shape = colour.SpectralShape(start=0, end=10, interval=1)
for wavelength in shape:
    print(wavelength)

# *colour.SpectralShape.range* method is providing the complete range of values.
shape = colour.SpectralShape(0, 10, 0.5)
shape.range()
0.0
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
10.0
array([  0. ,   0.5,   1. ,   1.5,   2. ,   2.5,   3. ,   3.5,   4. ,
         4.5,   5. ,   5.5,   6. ,   6.5,   7. ,   7.5,   8. ,   8.5,
         9. ,   9.5,  10. ])

Colour defines three convenient objects to create constant spectral distributions:

  • colour.sd_constant
  • colour.sd_zeros
  • colour.sd_ones
# Defining a constant spectral distribution.
sd_constant = colour.sd_constant(100)
print('"Constant Spectral Distribution"')
print(sd_constant.shape)
print(sd_constant[400])

# Defining a zeros filled spectral distribution.
print('\n"Zeros Filled Spectral Distribution"')
sd_zeros = colour.sd_zeros()
print(sd_zeros.shape)
print(sd_zeros[400])

# Defining a ones filled spectral distribution.
print('\n"Ones Filled Spectral Distribution"')
sd_ones = colour.sd_ones()
print(sd_ones.shape)
print(sd_ones[400])
"Constant Spectral Distribution"
(360.0, 780.0, 1.0)
100.0

"Zeros Filled Spectral Distribution"
(360.0, 780.0, 1.0)
0.0

"Ones Filled Spectral Distribution"
(360.0, 780.0, 1.0)
1.0

By default the shape used by colour.sd_constant, colour.sd_zeros and colour.sd_ones is the one defined by the colour.DEFAULT_SPECTRAL_SHAPE attribute and based on ASTM E308-15 practise shape.

print(repr(colour.DEFAULT_SPECTRAL_SHAPE))
SpectralShape(360, 780, 1)

A custom shape can be passed to construct a constant spectral distribution with user defined dimensions:

colour.sd_ones(colour.SpectralShape(400, 700, 5))[450]
1.0

The colour.SpectralDistribution class supports the following arithmetical operations:

  • addition
  • subtraction
  • multiplication
  • division
  • exponentiation
spd1 = colour.sd_ones()
print('"Ones Filled Spectral Distribution"')
print(spd1[400])

print('\n"x2 Constant Multiplied"')
print((spd1 * 2)[400])

print('\n"+ Spectral Distribution"')
print((spd1 + colour.sd_ones())[400])
"Ones Filled Spectral Distribution"
1.0

"x2 Constant Multiplied"
2.0

"+ Spectral Distribution"
2.0

Often interpolation of the spectral distribution is required, this is achieved with the colour.SpectralDistribution.interpolate method. Depending on the wavelengths uniformity, the default interpolation method will differ. Following CIE 167:2005 recommendation: The method developed by Sprague (1880) should be used for interpolating functions having a uniformly spaced independent variable and a Cubic Spline method for non-uniformly spaced independent variable [CIET13805a].

The uniformity of the sample spectral distribution is assessed as follows:

# Checking the sample spectral distribution uniformity.
print(sd.is_uniform())
True

In this case, since the sample spectral distribution is uniform the interpolation defaults to the colour.SpragueInterpolator interpolator.

Note

Interpolation happens in place and may alter the original data, use the colour.SpectralDistribution.copy method to generate a copy of the spectral distribution before interpolation.

# Copying the sample spectral distribution.
sd_copy = sd.copy()

# Interpolating the copied sample spectral distribution.
sd_copy.interpolate(colour.SpectralShape(400, 770, 1))
sd_copy[401]
0.065809599999999996
# Comparing the interpolated spectral distribution with the original one.
plot_multi_sds([sd, sd_copy], bounding_box=[730,780, 0.25, 0.5])
_images/Tutorial_SD_Interpolation.png

Extrapolation although dangerous can be used to help aligning two spectral distributions together. CIE publication CIE 15:2004 “Colorimetry” recommends that unmeasured values may be set equal to the nearest measured value of the appropriate quantity in truncation [CIET14804d]:

# Extrapolating the copied sample spectral distribution.
sd_copy.extrapolate(colour.SpectralShape(340, 830))
sd_copy[340], sd_copy[830]
(0.065000000000000002, 0.44800000000000018)

The underlying interpolator can be swapped for any of the Colour interpolators.

pprint([
    export for export in colour.algebra.interpolation.__all__
    if 'Interpolator' in export
])
[u'KernelInterpolator',
 u'LinearInterpolator',
 u'SpragueInterpolator',
 u'CubicSplineInterpolator',
 u'PchipInterpolator',
 u'NullInterpolator']
# Changing interpolator while trimming the copied spectral distribution.
sd_copy.interpolate(
    colour.SpectralShape(400, 700, 10), interpolator=colour.LinearInterpolator)
SpectralDistribution([[  4.00000000e+02,   6.50000000e-02],
                      [  4.10000000e+02,   6.80000000e-02],
                      [  4.20000000e+02,   6.40000000e-02],
                      [  4.30000000e+02,   5.90000000e-02],
                      [  4.40000000e+02,   5.50000000e-02],
                      [  4.50000000e+02,   5.30000000e-02],
                      [  4.60000000e+02,   5.20000000e-02],
                      [  4.70000000e+02,   5.20000000e-02],
                      [  4.80000000e+02,   5.40000000e-02],
                      [  4.90000000e+02,   5.70000000e-02],
                      [  5.00000000e+02,   6.10000000e-02],
                      [  5.10000000e+02,   6.50000000e-02],
                      [  5.20000000e+02,   7.00000000e-02],
                      [  5.30000000e+02,   7.40000000e-02],
                      [  5.40000000e+02,   7.60000000e-02],
                      [  5.50000000e+02,   7.90000000e-02],
                      [  5.60000000e+02,   8.70000000e-02],
                      [  5.70000000e+02,   1.00000000e-01],
                      [  5.80000000e+02,   1.15000000e-01],
                      [  5.90000000e+02,   1.29000000e-01],
                      [  6.00000000e+02,   1.38000000e-01],
                      [  6.10000000e+02,   1.46000000e-01],
                      [  6.20000000e+02,   1.54000000e-01],
                      [  6.30000000e+02,   1.63000000e-01],
                      [  6.40000000e+02,   1.73000000e-01],
                      [  6.50000000e+02,   1.88000000e-01],
                      [  6.60000000e+02,   2.04000000e-01],
                      [  6.70000000e+02,   2.22000000e-01],
                      [  6.80000000e+02,   2.42000000e-01],
                      [  6.90000000e+02,   2.61000000e-01],
                      [  7.00000000e+02,   2.82000000e-01]],
                     interpolator=SpragueInterpolator,
                     interpolator_args={},
                     extrapolator=Extrapolator,
                     extrapolator_args={u'right': None, u'method': u'Constant', u'left': None})

The extrapolation behaviour can be changed for Linear method instead of the Constant default method or even use arbitrary constant left and right values:

# Extrapolating the copied sample spectral distribution with *Linear* method.
sd_copy.extrapolate(
    colour.SpectralShape(340, 830),
    extrapolator_args={'method': 'Linear',
                       'right': 0})
sd_copy[340], sd_copy[830]
(0.046999999999999348, 0.0)

Aligning a spectral distribution is a convenient way to first interpolates the current data within its original bounds, then, if required, extrapolate any missing values to match the requested shape:

# Aligning the cloned sample spectral distribution.
# The spectral distribution is first trimmed as above.
sd_copy.interpolate(colour.SpectralShape(400, 700))
sd_copy.align(colour.SpectralShape(340, 830, 5))
sd_copy[340], sd_copy[830]
(0.065000000000000002, 0.28199999999999975)

The colour.SpectralDistribution class also supports various arithmetic operations like addition, subtraction, multiplication, division or exponentiation with numeric and array_like variables or other colour.SpectralDistribution class instances:

sd = colour.SpectralDistribution({
    410: 0.25,
    420: 0.50,
    430: 0.75,
    440: 1.0,
    450: 0.75,
    460: 0.50,
    480: 0.25
})

print((sd.copy() + 1).values)
print((sd.copy() * 2).values)
print((sd * [0.35, 1.55, 0.75, 2.55, 0.95, 0.65, 0.15]).values)
print((sd * colour.sd_constant(2, sd.shape) * colour.sd_constant(3, sd.shape)).values)
[ 1.25  1.5   1.75  2.    1.75  1.5   1.25]
[ 0.5  1.   1.5  2.   1.5  1.   0.5]
[ 0.0875  0.775   0.5625  2.55    0.7125  0.325   0.0375]
[ 1.5  3.   4.5  6.   4.5  3.   nan  1.5]

The spectral distribution can be normalised with an arbitrary factor:

print(sd.normalise().values)
print(sd.normalise(100).values)
[ 0.25  0.5   0.75  1.    0.75  0.5   0.25]
[  25.   50.   75.  100.   75.   50.   25.]

A the heart of the colour.SpectralDistribution class is the colour.continuous.Signal class which implements the colour.continuous.Signal.function method.

Evaluating the function for any independent domain \(x \in \mathbb{R}\) variable returns a corresponding range \(y \in \mathbb{R}\) variable.

It adopts an interpolating function encapsulated inside an extrapolating function. The resulting function independent domain, stored as discrete values in the colour.continuous.Signal.domain attribute corresponds with the function dependent and already known range stored in the colour.continuous.Signal.range attribute.

Describing the colour.continuous.Signal class is beyond the scope of this tutorial but the core capability can be described.

import numpy as np

range_ = np.linspace(10, 100, 10)
signal = colour.continuous.Signal(range_)
print(repr(signal))
Signal([[   0.,   10.],
        [   1.,   20.],
        [   2.,   30.],
        [   3.,   40.],
        [   4.,   50.],
        [   5.,   60.],
        [   6.,   70.],
        [   7.,   80.],
        [   8.,   90.],
        [   9.,  100.]],
       interpolator=KernelInterpolator,
       interpolator_args={},
       extrapolator=Extrapolator,
       extrapolator_args={u'right': nan, u'method': u'Constant', u'left': nan})
# Returning the corresponding range *y* variable for any arbitrary independent domain *x* variable.
signal[np.random.uniform(0, 9, 10)]
array([ 55.91309735,  65.4172615 ,  65.54495059,  88.17819416,
        61.88860248,  10.53878826,  55.25130534,  46.14659783,
        86.41406136,  84.59897703])
Convert to Tristimulus Values

From a given spectral distribution, CIE XYZ tristimulus values can be calculated:

sd = colour.SpectralDistribution(sample_sd_data)
cmfs = colour.STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer']
illuminant = colour.ILLUMINANTS_SDS['D65']

# Calculating the sample spectral distribution *CIE XYZ* tristimulus values.
XYZ = colour.sd_to_XYZ(sd, cmfs, illuminant)
print(XYZ)
[ 10.97085572   9.70278591   6.05562778]
From CIE XYZ Colourspace

CIE XYZ is the central colourspace for Colour Science from which many computations are available, expanding to even more computations:

# Displaying objects interacting directly with the *CIE XYZ* colourspace.
pprint([name for name in colour.__all__ if name.startswith('XYZ_to')])
['XYZ_to_ATD95',
 'XYZ_to_CAM16',
 'XYZ_to_CIECAM02',
 'XYZ_to_Hunt',
 'XYZ_to_LLAB',
 'XYZ_to_Nayatani95',
 'XYZ_to_RLAB',
 'XYZ_to_Hunter_Lab',
 'XYZ_to_Hunter_Rdab',
 'XYZ_to_IPT',
 'XYZ_to_JzAzBz',
 'XYZ_to_K_ab_HunterLab1966',
 'XYZ_to_Lab',
 'XYZ_to_Luv',
 'XYZ_to_OSA_UCS',
 'XYZ_to_RGB',
 'XYZ_to_UCS',
 'XYZ_to_UVW',
 'XYZ_to_hdr_CIELab',
 'XYZ_to_hdr_IPT',
 'XYZ_to_sRGB',
 'XYZ_to_xy',
 'XYZ_to_xyY',
 'XYZ_to_sd']
Convert to Screen Colours

CIE XYZ tristimulus values can be converted into sRGB colourspace RGB values in order to display them on screen:

# The output domain of *colour.sd_to_XYZ* is [0, 100] and the input
# domain of *colour.XYZ_to_sRGB* is [0, 1]. It needs to be accounted for,
# thus the input *CIE XYZ* tristimulus values are scaled.
RGB = colour.XYZ_to_sRGB(XYZ / 100)
print(RGB)
[ 0.45675795  0.30986982  0.24861924]
# Plotting the *sRGB* colourspace colour of the *Sample* spectral distribution.
plot_single_colour_swatch(
    ColourSwatch('Sample', RGB),
    text_parameters={'size': 'x-large'})
_images/Tutorial_Sample_Swatch.png
Generate Colour Rendition Charts

Likewise, colour values from a colour rendition chart sample can be computed.

Note

This is useful for render time checks in the VFX industry, where a synthetic colour chart can be inserted into a render to ensure the colour management is acting as expected.

The colour.characterisation sub-package contains the dataset for various colour rendition charts:

# Colour rendition charts chromaticity coordinates.
print(sorted(colour.characterisation.COLOURCHECKERS.keys()))

# Colour rendition charts spectral distributions.
print(sorted(colour.characterisation.COLOURCHECKERS_SDS.keys()))
['BabelColor Average', 'ColorChecker 1976', 'ColorChecker 2005', 'ColorChecker24 - After November 2014', 'ColorChecker24 - Before November 2014', 'babel_average', 'cc2005', 'cca2014', 'ccb2014']
['BabelColor Average', 'ColorChecker N Ohta', 'babel_average', 'cc_ohta']

Note

The above cc2005, babel_average and cc_ohta keys are convenient aliases for respectively ColorChecker 2005, BabelColor Average and ColorChecker N Ohta keys.

# Plotting the *sRGB* colourspace colour of *neutral 5 (.70 D)* patch.
patch_name = 'neutral 5 (.70 D)'
patch_sd = colour.COLOURCHECKERS_SDS['ColorChecker N Ohta'][patch_name]
XYZ = colour.sd_to_XYZ(patch_sd, cmfs, illuminant)
RGB = colour.XYZ_to_sRGB(XYZ / 100)

plot_single_colour_swatch(
    ColourSwatch(patch_name.title(), RGB),
    text_parameters={'size': 'x-large'})
_images/Tutorial_Neutral5.png

Colour defines a convenient plotting object to draw synthetic colour rendition charts figures:

plot_single_colour_checker(colour_checker='ColorChecker 2005', text_parameters={'visible': False})
_images/Tutorial_Colour_Checker.png
Convert to Chromaticity Coordinates

Given a spectral distribution, chromaticity coordinates xy can be computed using the colour.XYZ_to_xy definition:

# Computing *xy* chromaticity coordinates for the *neutral 5 (.70 D)* patch.
xy =  colour.XYZ_to_xy(XYZ)
print(xy)
[ 0.31259787  0.32870029]

Chromaticity coordinates xy can be plotted into the CIE 1931 Chromaticity Diagram:

import matplotlib.pyplot as plt

# Plotting the *CIE 1931 Chromaticity Diagram*.
# The argument *standalone=False* is passed so that the plot doesn't get
# displayed and can be used as a basis for other plots.
plot_chromaticity_diagram_CIE1931(standalone=False)

# Plotting the *xy* chromaticity coordinates.
x, y = xy
plt.plot(x, y, 'o-', color='white')

# Annotating the plot.
plt.annotate(patch_sd.name.title(),
             xy=xy,
             xytext=(-50, 30),
             textcoords='offset points',
             arrowprops=dict(arrowstyle='->', connectionstyle='arc3, rad=-0.2'))

# Displaying the plot.
render(
    standalone=True,
    limits=(-0.1, 0.9, -0.1, 0.9),
    x_tighten=True,
    y_tighten=True)
_images/Tutorial_CIE_1931_Chromaticity_Diagram.png
And More…

With the hope that this small introduction was useful and gave envy to see more, a good place to explore the API further more is the Jupyter Notebooks page.

Basics

N-Dimensional Arrays Support

Most of Colour definitions are fully vectorised and support n-dimensional arrays by leveraging Numpy.

While it is recommended to use ndarrays as input for the API objects, it is possible to use tuples or lists:

import colour

xyY = (0.4316, 0.3777, 0.1008)
colour.xyY_to_XYZ(xyY)
array([ 0.11518475,  0.1008    ,  0.05089373])
xyY = [0.4316, 0.3777, 0.1008]
colour.xyY_to_XYZ(xyY)
array([ 0.11518475,  0.1008    ,  0.05089373])
xyY = [
    (0.4316, 0.3777, 0.1008),
    (0.4316, 0.3777, 0.1008),
    (0.4316, 0.3777, 0.1008),
]
colour.xyY_to_XYZ(xyY)
array([[ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373]])

As shown in the above example, there is widespread support for n-dimensional arrays:

import numpy as np

xyY = np.array([0.4316, 0.3777, 0.1008])
xyY = np.tile(xyY, (6, 1))
colour.xyY_to_XYZ(xyY)
array([[ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373],
       [ 0.11518475,  0.1008    ,  0.05089373]])
colour.xyY_to_XYZ(xyY.reshape((2, 3, 3)))
array([[[ 0.11518475,  0.1008    ,  0.05089373],
        [ 0.11518475,  0.1008    ,  0.05089373],
        [ 0.11518475,  0.1008    ,  0.05089373]],

       [[ 0.11518475,  0.1008    ,  0.05089373],
        [ 0.11518475,  0.1008    ,  0.05089373],
        [ 0.11518475,  0.1008    ,  0.05089373]]])

Which enables image processing:

import colour.plotting

RGB = colour.read_image('_static/Logo_Small_001.png')
RGB = RGB[..., 0:3]  # Discarding alpha channel.
XYZ = colour.sRGB_to_XYZ(RGB)
colour.plotting.plot_image(XYZ, text_parameters={'text': 'sRGB to XYZ'})
_images/Basics_Logo_Small_001_CIE_XYZ.png
Domain-Range Scales

Note

This section has important information.

Colour adopts 4 main input domains and output ranges:

  • Scalars usually in domain-range [0, 1] (or [0, 10] for Munsell Value).
  • Percentages usually in domain-range [0, 100].
  • Degrees usually in domain-range [0, 360].
  • Integers usually in domain-range [0, 2**n -1] where n is the bit depth.

It is error prone but it is also a direct consequence of the inconsistency of the colour science field itself. We have discussed at length about this and we were leaning toward normalisation of the whole API to domain-range [0, 1], we never committed for reasons highlighted by the following points:

  • Colour Scientist performing computations related to Munsell Renotation System would be very surprised if the output Munsell Value was in range [0, 1] or [0, 100].
  • A Visual Effect Industry artist would be astonished to find out that conversion from CIE XYZ to sRGB was yielding values in range [0, 100].

However benefits of having a consistent and predictable domain-range scale are numerous thus with Colour 0.3.12 we have introduced a mechanism to allow users to work within one of the two available domain-range scales.

Scale - Reference

‘Reference’ is the default domain-range scale of Colour, objects adopt the implemented reference, i.e. paper, publication, etc.., domain-range scale.

The ‘Reference’ domain-range scale is inconsistent, e.g. colour appearance models, spectral conversions are typically in domain-range [0, 100] while RGB models will operate in domain-range [0, 1]. Some objects, e.g. colour.colorimetry.lightness_Fairchild2011() definition have mismatched domain-range: input domain [0, 1] and output range [0, 100].

Scale - 1

‘1’ is a domain-range scale converting all the relevant objects from Colour public API to domain-range [0, 1]:

  • Scalars in domain-range [0, 10], e.g Munsell Value are scaled by 10.
  • Percentages in domain-range [0, 100] are scaled by 100.
  • Degrees in domain-range [0, 360] are scaled by 100.
  • Integers in domain-range [0, 2**n -1] where n is the bit depth are scaled by 2**n -1.

Warning

The conversion to ‘1’ domain-range scale is a soft normalisation and similarly to the ‘Reference’ domain-range scale it is normal that you encounter values exceeding 1, e.g. High Dynamic Range Imagery (HDRI) or negative values, e.g. out-of-gamut RGB colourspace values.

Understanding the Domain-Range Scale of an Object

Using colour.adaptation.chromatic_adaptation_CIE1994() definition docstring as an example, the Notes section features two tables.

The first table is for the domain, and lists the input arguments affected by the two domain-range scales and which normalisation they should adopt depending the domain-range scale in use:

Domain Scale - Reference Scale - 1
XYZ_1 [0, 100] [0, 1]
Y_o [0, 100] [0, 1]

The second table is for the range and lists the return value of the definition:

Range Scale - Reference Scale - 1
XYZ_2 [0, 100] [0, 1]
Working with the Domain-Range Scales

The current domain-range scale is returned with the colour.get_domain_range_scale() definition:

import colour

colour.get_domain_range_scale()
u'reference'

Changing from the ‘Reference’ default domain-range scale to ‘1’ is done with the colour.set_domain_range_scale() definition:

XYZ_1 = [28.00, 21.26, 5.27]
xy_o1 = [0.4476, 0.4074]
xy_o2 = [0.3127, 0.3290]
Y_o = 20
E_o1 = 1000
E_o2 = 1000
colour.adaptation.chromatic_adaptation_CIE1994(XYZ_1, xy_o1, xy_o2, Y_o, E_o1, E_o2)
array([ 24.03379521,  21.15621214,  17.64301199])
colour.set_domain_range_scale('1')

XYZ_1 = [0.2800, 0.2126, 0.0527]
Y_o = 0.2
colour.adaptation.chromatic_adaptation_CIE1994(XYZ_1, xy_o1, xy_o2, Y_o, E_o1, E_o2)
array([ 0.24033795,  0.21156212,  0.17643012])

The output tristimulus values with the ‘1’ domain-range scale are equal to those from ‘Reference’ default domain-range scale divided by 100.

Passing incorrectly scaled values to the colour.adaptation.chromatic_adaptation_CIE1994() definition would result in unexpected values and a warning in that case:

colour.set_domain_range_scale('Reference')

colour.adaptation.chromatic_adaptation_CIE1994(XYZ_1, xy_o1, xy_o2, Y_o, E_o1, E_o2)
File "<ipython-input-...>", line 4, in <module>
  E_o2)
File "/colour-science/colour/colour/adaptation/cie1994.py", line 134, in chromatic_adaptation_CIE1994
  warning(('"Y_o" luminance factor must be in [18, 100] domain, '
/colour-science/colour/colour/utilities/verbose.py:207: ColourWarning: "Y_o" luminance factor must be in [18, 100] domain, unpredictable results may occur!
  warn(*args, **kwargs)
array([ 0.17171825,  0.13731098,  0.09972054])

Setting the ‘1’ domain-range scale has the following effect on the colour.adaptation.chromatic_adaptation_CIE1994() definition:

As it expects values in domain [0, 100], scaling occurs and the relevant input values, i.e. the values listed in the domain table, XYZ_1 and Y_o are converted from domain [0, 1] to domain [0, 100] by colour.utilities.to_domain_100() definition and conversely return value XYZ_2 is converted from range [0, 100] to range [0, 1] by colour.utilities.from_range_100() definition.

A convenient alternative to the colour.set_domain_range_scale() definition is the colour.domain_range_scale context manager and decorator. It temporarily overrides Colour domain-range scale with given scale value:

with colour.domain_range_scale('1'):
    colour.adaptation.chromatic_adaptation_CIE1994(XYZ_1, xy_o1, xy_o2, Y_o, E_o1, E_o2)
[ 0.24033795  0.21156212  0.17643012]

Reference

Colour
Chromatic Adaptation
Chromatic Adaptation

colour

chromatic_adaptation(XYZ, XYZ_w, XYZ_wr[, …]) Adapts given stimulus from test viewing conditions to reference viewing conditions.
CHROMATIC_ADAPTATION_METHODS Supported chromatic adaptation methods.
CMCCAT2000_VIEWING_CONDITIONS Reference CMCCAT2000 chromatic adaptation model viewing conditions.

Dataset

colour

CHROMATIC_ADAPTATION_TRANSFORMS Supported chromatic adaptation transforms.
Fairchild (1990)

colour.adaptation

chromatic_adaptation_Fairchild1990(XYZ_1, …) Adapts given stimulus CIE XYZ_1 tristimulus values from test viewing conditions to reference viewing conditions using Fairchild (1990) chromatic adaptation model.
CIE 1994

colour.adaptation

chromatic_adaptation_CIE1994(XYZ_1, xy_o1, …) Adapts given stimulus CIE XYZ_1 tristimulus values from test viewing conditions to reference viewing conditions using CIE 1994 chromatic adaptation model.
CMCCAT2000

colour.adaptation

chromatic_adaptation_CMCCAT2000(XYZ, XYZ_w, …) Adapts given stimulus CIE XYZ tristimulus values using given viewing conditions.
CMCCAT2000_VIEWING_CONDITIONS Reference CMCCAT2000 chromatic adaptation model viewing conditions.

Ancillary Objects

colour.adaptation

chromatic_adaptation_forward_CMCCAT2000(XYZ, …) Adapts given stimulus CIE XYZ tristimulus values from test viewing conditions to reference viewing conditions using CMCCAT2000 forward chromatic adaptation model.
chromatic_adaptation_reverse_CMCCAT2000(…) Adapts given stimulus corresponding colour CIE XYZ tristimulus values from reference viewing conditions to test viewing conditions using CMCCAT2000 reverse chromatic adaptation model.
CMCCAT2000_InductionFactors CMCCAT2000 chromatic adaptation model induction factors.
Von Kries

colour.adaptation

chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr) Adapts given stimulus from test viewing conditions to reference viewing conditions.
CHROMATIC_ADAPTATION_TRANSFORMS Supported chromatic adaptation transforms.

Dataset

colour.adaptation

BRADFORD_CAT
BS_CAT
BS_PC_CAT
CAT02_BRILL_CAT
CAT02_CAT
CMCCAT2000_CAT
CMCCAT97_CAT
FAIRCHILD_CAT
SHARP_CAT
VON_KRIES_CAT
XYZ_SCALING_CAT

Ancillary Objects

colour.adaptation

chromatic_adaptation_matrix_VonKries(XYZ_w, …) Computes the chromatic adaptation matrix from test viewing conditions to reference viewing conditions.
Algebra
Extrapolation

colour

Extrapolator([interpolator, method, left, …]) Extrapolates the 1-D function of given interpolator.
Interpolation

colour

KernelInterpolator(x, y[, window, kernel, …]) Kernel based interpolation of a 1-D function.
NearestNeighbourInterpolator(*args, **kwargs) A nearest-neighbour interpolator.
LinearInterpolator(x, y[, dtype]) Linearly interpolates a 1-D function.
NullInterpolator(x, y[, absolute_tolerance, …]) Performs 1-D function null interpolation, i.e.
PchipInterpolator(x, y, *args, **kwargs) Interpolates a 1-D function using Piecewise Cubic Hermite Interpolating Polynomial interpolation.
SpragueInterpolator(x, y[, dtype]) Constructs a fifth-order polynomial that passes through \(y\) dependent variable.
lagrange_coefficients(r[, n]) Computes the Lagrange Coefficients at given point \(r\) for degree \(n\).
TABLE_INTERPOLATION_METHODS Supported table interpolation methods.
table_interpolation(V_xyz, table[, method]) Performs interpolation of given \(V_{xyz}\) values using given interpolation table.

Interpolation Kernels

colour

kernel_nearest_neighbour(x) Returns the nearest-neighbour kernel evaluated at given samples.
kernel_linear(x) Returns the linear kernel evaluated at given samples.
kernel_sinc(x[, a]) Returns the sinc kernel evaluated at given samples.
kernel_lanczos(x[, a]) Returns the lanczos kernel evaluated at given samples.
kernel_cardinal_spline(x[, a, b]) Returns the cardinal spline kernel evaluated at given samples.

Ancillary Objects

colour.algebra

table_interpolation_trilinear(V_xyz, table) Performs trilinear interpolation of given \(V_{xyz}\) values using given interpolation table.
table_interpolation_tetrahedral(V_xyz, table) Performs tetrahedral interpolation of given \(V_{xyz}\) values using given interpolation table.
Coordinates

colour.algebra

cartesian_to_spherical(a) Transforms given Cartesian coordinates array \(xyz\) to Spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth).
spherical_to_cartesian(a) Transforms given Spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth) to Cartesian coordinates array \(xyz\).
cartesian_to_polar(a) Transforms given Cartesian coordinates array \(xy\) to Polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate).
polar_to_cartesian(a) Transforms given Polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to Cartesian coordinates array \(xy\).
cartesian_to_cylindrical(a) Transforms given Cartesian coordinates array \(xyz\) to Cylindrical coordinates array \(\rho\phi z\) (azimuth, radial distance and height).
cylindrical_to_cartesian(a) Transforms given Cylindrical coordinates array \(\rho\phi z\) (azimuth, radial distance and height) to Cartesian coordinates array \(xyz\).
Geometry

colour.algebra

normalise_vector(a) Normalises given vector \(a\).
euclidean_distance(a, b) Returns the euclidean distance between point arrays \(a\) and \(b\).
extend_line_segment(a, b[, distance]) Extends the line segment defined by point arrays \(a\) and \(b\) by given distance and return the new end point.
intersect_line_segments(l_1, l_2) Computes \(l_1\) line segments intersections with \(l_2\) line segments.
ellipse_coefficients_general_form(coefficients) Returns the general form ellipse coefficients from given canonical form ellipse coefficients.
ellipse_coefficients_canonical_form(coefficients) Returns the canonical form ellipse coefficients from given general form ellipse coefficients.
point_at_angle_on_ellipse(phi, coefficients) Returns the coordinates of the point at angle \(\phi\) in degrees on the ellipse with given canonical form coefficients.
ELLIPSE_FITTING_METHODS Supported ellipse fitting methods.
ellipse_fitting(a[, method]) Returns the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using given method.

Ancillary Objects

colour.algebra

LineSegmentsIntersections_Specification Defines the specification for intersection of line segments \(l_1\) and \(l_2\) returned by colour.algebra.intersect_line_segments() definition.
ellipse_fitting_Halir1998(a) Returns the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using Halir and Flusser (1998) method.
Matrix

colour.algebra

is_identity(a[, n]) Returns if \(a\) array is an identity matrix.
Random

colour.algebra

random_triplet_generator(size[, limits, …]) Returns a generator yielding random triplets.
Regression

colour.algebra

least_square_mapping_MoorePenrose(y, x) Computes the least-squares mapping from dependent variable \(y\) to independent variable \(x\) using Moore-Penrose inverse.
Common

colour.algebra

is_spow_enabled() Returns whether Colour safe / symmetrical power function is enabled.
set_spow_enable(enable) Sets Colour safe / symmetrical power function enabled state.
spow_enable(enable) A context manager and decorator temporarily setting Colour safe / symmetrical power function enabled state.
spow(a, p) Raises given array \(a\) to the power \(p\) as follows: \(sign(a) * |a|^p\).
Colour Appearance Models
ATD (1995)

colour

XYZ_to_ATD95(XYZ, XYZ_0, Y_0, k_1, k_2[, sigma]) Computes the ATD (1995) colour vision model correlates.
ATD95_Specification Defines the ATD (1995) colour vision model specification.
CIECAM02

colour

XYZ_to_CIECAM02(XYZ, XYZ_w, L_A, Y_b[, …]) Computes the CIECAM02 colour appearance model correlates from given CIE XYZ tristimulus values.
CIECAM02_to_XYZ(CIECAM02_specification, …) Converts CIECAM02 specification to CIE XYZ tristimulus values.
CIECAM02_Specification Defines the CIECAM02 colour appearance model specification.
CIECAM02_VIEWING_CONDITIONS Reference CIECAM02 colour appearance model viewing conditions.

Ancillary Objects

colour.appearance

CIECAM02_InductionFactors CIECAM02 colour appearance model induction factors.
CAM16

colour

XYZ_to_CAM16(XYZ, XYZ_w, L_A, Y_b[, …]) Computes the CAM16 colour appearance model correlates from given CIE XYZ tristimulus values.
CAM16_to_XYZ(CAM16_specification, XYZ_w, …) Converts CAM16 specification to CIE XYZ tristimulus values.
CAM16_Specification Defines the CAM16 colour appearance model specification.
CAM16_VIEWING_CONDITIONS Reference CAM16 colour appearance model viewing conditions.

Ancillary Objects

colour.appearance

CAM16_InductionFactors CAM16 colour appearance model induction factors.
Hunt

colour

XYZ_to_Hunt(XYZ, XYZ_w, XYZ_b, L_A[, …]) Computes the Hunt colour appearance model correlates.
Hunt_Specification Defines the Hunt colour appearance model specification.
HUNT_VIEWING_CONDITIONS Reference Hunt colour appearance model viewing conditions.
\(LLAB(l:c)\)

colour

XYZ_to_LLAB(XYZ, XYZ_0, Y_b, L[, surround, …]) Computes the :math:`LLAB(l:c)` colour appearance model correlates.
LLAB_Specification Defines the :math:`LLAB(l:c)` colour appearance model specification.
LLAB_VIEWING_CONDITIONS Reference \(LLAB(l:c)\) colour appearance model viewing conditions.

Ancillary Objects

colour.appearance

LLAB_InductionFactors :math:`LLAB(l:c)` colour appearance model induction factors.
Nayatani (1995)

colour

XYZ_to_Nayatani95(XYZ, XYZ_n, Y_o, E_o, E_or) Computes the Nayatani (1995) colour appearance model correlates.
Nayatani95_Specification Defines the Nayatani (1995) colour appearance model specification.
RLAB

colour

XYZ_to_RLAB(XYZ, XYZ_n, Y_n[, sigma, D]) Computes the RLAB model color appearance correlates.
RLAB_D_FACTOR RLAB colour appearance model Discounting-the-Illuminant factor values.
RLAB_Specification Defines the RLAB colour appearance model specification.
RLAB_VIEWING_CONDITIONS Reference RLAB colour appearance model viewing conditions.
Biochemistry
Michaelis–Menten Kinetics

colour.biochemistry

reaction_rate_MichealisMenten(S, V_max, K_m) Describes the rate of enzymatic reactions, by relating reaction rate \(v\) to concentration of a substrate \(S\).
substrate_concentration_MichealisMenten(v, …) Describes the rate of enzymatic reactions, by relating concentration of a substrate \(S\) to reaction rate \(v\).
Colour Vision Deficiency
Machado, Oliveira and Fernandes (2009)

colour

anomalous_trichromacy_cmfs_Machado2009(cmfs, …) Shifts given LMS cone fundamentals colour matching functions with given \(\Delta_{LMS}\) shift amount in nanometers to simulate anomalous trichromacy using Machado et al.(2009) method..
anomalous_trichromacy_matrix_Machado2009(…) Computes Machado et al.(2009) CVD matrix for given LMS cone fundamentals colour matching functions and display primaries tri-spectral distributions with given \(\Delta_{LMS}\) shift amount in nanometers to simulate anomalous trichromacy..
cvd_matrix_Machado2009(deficiency, severity) Computes Machado et al.(2009) CVD matrix for given deficiency and severity using the pre-computed matrices dataset..

Dataset

colour

CVD_MATRICES_MACHADO2010 Machado (2010) Simulation matrices \(\Phi_{CVD}\).
Colour Characterisation
Colour Fitting

colour

POLYNOMIAL_EXPANSION_METHODS Supported polynomial expansion methods.
polynomial_expansion(a[, method]) Performs polynomial expansion of given \(a\) array.
COLOUR_CORRECTION_MATRIX_METHODS Supported colour correction matrix methods.
colour_correction_matrix(M_T, M_R[, method]) Computes a colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array.
COLOUR_CORRECTION_METHODS Supported colour correction methods.
colour_correction(RGB, M_T, M_R[, method]) Performs colour correction of given RGB colourspace array using the colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array.

Ancillary Objects

colour.characterisation

augmented_matrix_Cheung2004(RGB[, terms]) Performs polynomial expansion of given RGB colourspace array using Cheung et al.(2004) method..
polynomial_expansion_Finlayson2015(RGB[, …]) Performs polynomial expansion of given RGB colourspace array using Finlayson et al.(2015) method..
polynomial_expansion_Vandermonde(a[, degree]) Performs polynomial expansion of given \(a\) array using Vandermonde method.
colour_correction_matrix_Cheung2004(M_T, M_R) Computes a colour correction from given \(M_T\) colour array to \(M_R\) colour array using Cheung et al.(2004) method..
colour_correction_matrix_Finlayson2015(M_T, M_R) Computes a colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Finlayson et al.(2015) method..
colour_correction_matrix_Vandermonde(M_T, M_R) Computes a colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Vandermonde method.
colour_correction_Cheung2004(RGB, M_T, M_R) Performs colour correction of given RGB colourspace array using the colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Cheung et al.(2004) method..
colour_correction_Finlayson2015(RGB, M_T, M_R) Performs colour correction of given RGB colourspace array using the colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Finlayson et al.(2015) method..
colour_correction_Vandermonde(RGB, M_T, M_R) Performs colour correction of given RGB colourspace array using the colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Vandermonde method.
Colour Rendition Charts

Dataset

colour

COLOURCHECKERS Aggregated ColourCheckers chromaticity coordinates.
COLOURCHECKERS_SDS Aggregated ColourCheckers spectral distributions.

Ancillary Objects

colour.characterisation

ColourChecker ColourChecker data.
Cameras

colour.characterisation

RGB_SpectralSensitivities([data, domain, labels]) Implements support for a camera RGB spectral sensitivities.

Dataset

colour

CAMERAS_RGB_SPECTRAL_SENSITIVITIES Cameras RGB spectral sensitivities.
Displays

colour.characterisation

RGB_DisplayPrimaries([data, domain, labels]) Implements support for a RGB display (such as a CRT or LCD) primaries multi-spectral distributions.

Dataset

colour

DISPLAYS_RGB_PRIMARIES Displays RGB primaries multi-spectral distributions.
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.
MultiSpectralDistribution([data, domain, labels]) Defines multi-spectral distribution: the base object for multi spectral computations.
DEFAULT_SPECTRAL_SHAPE (360, 780, 1).
ASTME30815_PRACTISE_SHAPE (360, 780, 1).
Spectral Data Generation

colour

sd_CIE_standard_illuminant_A([shape]) 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 xy chromaticity coordinates.
sd_blackbody(temperature[, shape, c1, c2, n]) Returns the spectral distribution of the planckian radiator for given temperature \(T[K]\).
sd_constant(k[, shape, dtype]) 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.
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\).
daylight_locus_function(x_D) Returns the daylight locus as xy chromaticity coordinates.
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\).
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.
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.
multi_sds_to_XYZ(msd[, shape, cmfs, …]) Converts given multi-spectral distribution array \(msd\) with given spectral shape to CIE XYZ tristimulus values using given colour matching functions and illuminant.
MULTI_SD_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

sd_to_XYZ_ASTME30815(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.

Ancillary Objects

colour.colorimetry

sd_to_XYZ_tristimulus_weighting_factors_ASTME30815(sd) 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.
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

sd_to_XYZ_integration(sd[, cmfs, illuminant, k]) Converts given spectral distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to classical integration method.
multi_sds_to_XYZ_integration(msd, shape[, …]) Converts given multi-spectral distribution array \(msd\) with given spectral shape 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

bandpass_correction_Stearns1988(sd) 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

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_SDS CIE illuminants spectral distributions.
HUNTERLAB_ILLUMINANTS Aggregated Hunter L,a,b illuminant dataset.
LIGHT_SOURCES Aggregated light sources chromaticity coordinates.
LIGHT_SOURCES_SDS Aggregated light sources spectral 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(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.
sd_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\) of given luminance \(Y\) 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.
intermediate_lightness_function_CIE1976(Y[, Y_n]) 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 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 according 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\).
intermediate_luminance_function_CIE1976(f_Y_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

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 according 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.
Constants
CIE

colour.constants

K_M Rounded maximum photopic luminous efficiency \(K_m\) value in \(lm\cdot W^{-1}\).
KP_M Rounded maximum scotopic luminous efficiency \(K^{\prime}_m\) value in \(lm\cdot W^{-1}\).
CODATA

colour.constants

AVOGADRO_CONSTANT Avogadro constant.
BOLTZMANN_CONSTANT Boltzmann constant.
LIGHT_SPEED Speed of light in vacuum.
PLANCK_CONSTANT Planck constant.
Common

colour.constants

DEFAULT_FLOAT_DTYPE alias of numpy.float64
EPSILON
FLOATING_POINT_NUMBER_PATTERN str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
INTEGER_THRESHOLD Integer threshold value.
Contrast Sensitivity
Contrast Sensitivity

colour

contrast_sensitivity_function([method]) Returns the contrast sensitivity \(S\) of the human eye according to the contrast sensitivity function (CSF) described by given method.
CONTRAST_SENSITIVITY_METHODS Supported contrast sensitivity methods.
Barten (1999) Contrast Sensitivity Function

colour.contrast

contrast_sensitivity_function_Barten1999(u) Returns the contrast sensitivity \(S\) of the human eye according to the contrast sensitivity function (CSF) described by Barten (1999).

Ancillary Objects

colour.contrast

optical_MTF_Barten1999(u[, sigma]) Returns the optical modulation transfer function (MTF) \(M_{opt}\) of the eye using Barten (1999) method.
pupil_diameter_Barten1999(L[, X_0, Y_0]) Returns the pupil diameter for given luminance and object or stimulus angular size using Barten (1999) method.
sigma_Barten1999([sigma_0, C_ab, d]) Returns the standard deviation \(\sigma\) of the line-spread function resulting from the convolution of the different elements of the convolution process using Barten (1999) method.
retinal_illuminance_Barten1999(L[, d, …]) Returns the retinal illuminance \(E\) in Trolands for given average luminance \(L\) and pupil diameter \(d\) using Barten (1999) method.
maximum_angular_size_Barten1999(u[, X_0, …]) Returns the maximum angular size \(X\) of the object considered using Barten (1999) method.
Continuous Signal
Continuous Signal

colour.continuous

AbstractContinuousFunction([name]) Defines the base class for abstract continuous function.
Signal([data, domain]) Defines the base class for continuous signal.
MultiSignal([data, domain, labels]) Defines the base class for multi-continuous signal, a container for multiple colour.continuous.Signal sub-class instances.
Corresponding Chromaticities
Prediction

colour

corresponding_chromaticities_prediction([…]) Returns the corresponding chromaticities prediction for given chromatic adaptation model.
CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS Aggregated corresponding chromaticities prediction models.

Dataset

colour

BRENEMAN_EXPERIMENTS Breneman (1987) experiments.
BRENEMAN_EXPERIMENTS_PRIMARIES_CHROMATICITIES Breneman (1987) experiments primaries chromaticities.
Fairchild (1990)

colour.corresponding

corresponding_chromaticities_prediction_Fairchild1990([…]) Returns the corresponding chromaticities prediction for Fairchild (1990) chromatic adaptation model.
CIE 1994

colour.corresponding

corresponding_chromaticities_prediction_CIE1994([…]) Returns the corresponding chromaticities prediction for CIE 1994 chromatic adaptation model.
CMCCAT2000

colour.corresponding

corresponding_chromaticities_prediction_CMCCAT2000([…]) Returns the corresponding chromaticities prediction for CMCCAT2000 chromatic adaptation model.
Von Kries

colour.corresponding

corresponding_chromaticities_prediction_VonKries([…]) Returns the corresponding chromaticities prediction for Von Kries chromatic adaptation model using given transform.
Colour Difference
Delta E

colour

delta_E(a, b[, method]) Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* or \(J'a'b'\) colourspace arrays using given method.
DELTA_E_METHODS Supported \(\Delta E_{ab}\) computations methods.
CIE 1976

colour.difference

delta_E_CIE1976(Lab_1, Lab_2) Returns the difference \(\Delta E_{76}\) between two given CIE L*a*b* colourspace arrays using CIE 1976 recommendation.
CIE 1994

colour.difference

delta_E_CIE1994(Lab_1, Lab_2[, textiles]) Returns the difference \(\Delta E_{94}\) between two given CIE L*a*b* colourspace arrays using CIE 1994 recommendation.
CIE 2000

colour.difference

delta_E_CIE2000(Lab_1, Lab_2[, textiles]) Returns the difference \(\Delta E_{00}\) between two given CIE L*a*b* colourspace arrays using CIE 2000 recommendation.
CMC

colour.difference

delta_E_CMC(Lab_1, Lab_2[, l, c]) Returns the difference \(\Delta E_{CMC}\) between two given CIE L*a*b* colourspace arrays using Colour Measurement Committee recommendation.
Luo, Cui and Li (2006)

colour.difference

delta_E_CAM02LCD(Jpapbp_1, Jpapbp_2) Returns the difference \(\Delta E'\) between two given Li et al.(2017) CAM16-LCD colourspaces \(J'a'b'\) arrays..
delta_E_CAM02SCD(Jpapbp_1, Jpapbp_2) Returns the difference \(\Delta E'\) between two given Li et al.(2017) CAM16-SCD colourspaces \(J'a'b'\) arrays..
delta_E_CAM02UCS(Jpapbp_1, Jpapbp_2) Returns the difference \(\Delta E'\) between two given Li et al.(2017) CAM16-UCS colourspaces \(J'a'b'\) arrays..
Li, Li, Wang, Zu, Luo, Cui, Melgosa, Brill and Pointer (2017)

colour.difference

delta_E_CAM16LCD(Jpapbp_1, Jpapbp_2) Returns the difference \(\Delta E'\) between two given Li et al.(2017) CAM16-LCD colourspaces \(J'a'b'\) arrays..
delta_E_CAM16SCD(Jpapbp_1, Jpapbp_2) Returns the difference \(\Delta E'\) between two given Li et al.(2017) CAM16-SCD colourspaces \(J'a'b'\) arrays..
delta_E_CAM16UCS(Jpapbp_1, Jpapbp_2) Returns the difference \(\Delta E'\) between two given Li et al.(2017) CAM16-UCS colourspaces \(J'a'b'\) arrays..
DIN99

colour.difference

delta_E_DIN99(Lab_1, Lab_2[, textiles]) Returns the difference \(\Delta E_{DIN99}\) between two given CIE L*a*b* colourspace arrays using DIN99 formula.
Input and Output
Image Data

colour

read_image(path[, bit_depth, attributes]) Reads given image using OpenImageIO.
write_image(image, path[, bit_depth, attributes]) Writes given image using OpenImageIO.

Ancillary Objects

colour.io

ImageAttribute_Specification Defines the an image specification attribute.
Look Up Table (LUT) Data

colour

LUT1D([table, name, domain, size, comments]) Defines the base class for a 1D LUT.
LUT3x1D([table, name, domain, size, comments]) Defines the base class for a 3x1D LUT.
LUT3D([table, name, domain, size, comments]) Defines the base class for a 3D LUT.
LUTSequence(*args) Defines the base class for a LUT sequence, i.e.
read_LUT(path[, method]) Reads given LUT file using given method.
write_LUT(LUT, path[, decimals, method]) Writes given LUT to given file using given method.

Ancillary Objects

colour.io

AbstractLUTSequenceOperator Defines the base class for LUT sequence operators.
LUT_to_LUT(LUT, cls[, force_conversion]) Converts given LUT to given cls class instance.
read_LUT_Cinespace(path) Reads given Cinespace .csp LUT file.
write_LUT_Cinespace(LUT, path[, decimals]) Writes given LUT to given Cinespace .csp LUT file.
read_LUT_IridasCube(path) Reads given Iridas .cube LUT file.
write_LUT_IridasCube(LUT, path[, decimals]) Writes given LUT to given Iridas .cube LUT file.
read_LUT_SonySPI1D(path) Reads given Sony .spi1d LUT file.
write_LUT_SonySPI1D(LUT, path[, decimals]) Writes given LUT to given Sony .spi1d LUT file.
read_LUT_SonySPI3D(path) Reads given Sony .spi3d LUT file.
write_LUT_SonySPI3D(LUT, path[, decimals]) Writes given LUT to given Sony .spi3d LUT file.
CSV Tabular Data

colour

read_sds_from_csv_file(path[, delimiter, …]) Reads the spectral data from given CSV file and return its content as an OrderedDict of colour.SpectralDistribution classes.
read_spectral_data_from_csv_file(path[, …]) Reads the spectral data from given CSV file in the following form:
write_sds_to_csv_file(sds, path[, …]) Writes the given spectral distributions to given CSV file.
IES TM-27-14 Data

colour

SpectralDistribution_IESTM2714([path, …]) Defines a IES TM-27-14 spectral distribution.
X-Rite Data

colour

read_sds_from_xrite_file(path) Reads the spectral data from given X-Rite file and returns it as an OrderedDict of colour.SpectralDistribution classes.
Colour Models
Tristimulus Values, CIE xyY Colourspace and Chromaticity Coordinates

colour

XYZ_to_xyY(XYZ[, illuminant]) Converts from CIE XYZ tristimulus values to CIE xyY colourspace and reference illuminant.
xyY_to_XYZ(xyY) Converts from CIE xyY colourspace to CIE XYZ tristimulus values.
XYZ_to_xy(XYZ[, illuminant]) Returns the xy chromaticity coordinates from given CIE XYZ tristimulus values.
xy_to_XYZ(xy) Returns the CIE XYZ tristimulus values from given xy chromaticity coordinates.
xyY_to_xy(xyY) Converts from CIE xyY colourspace to xy chromaticity coordinates.
xy_to_xyY(xy[, Y]) Converts from xy chromaticity coordinates to CIE xyY colourspace by extending the array last dimension with \(Y\) Luminance.
CIE L*a*b* Colourspace

colour

XYZ_to_Lab(XYZ[, illuminant]) Converts from CIE XYZ tristimulus values to CIE L*a*b* colourspace.
Lab_to_XYZ(Lab[, illuminant]) Converts from CIE L*a*b* colourspace to CIE XYZ tristimulus values.
Lab_to_LCHab(Lab) Converts from CIE L*a*b* colourspace to CIE L*C*Hab colourspace.
LCHab_to_Lab(LCHab) Converts from CIE L*C*Hab colourspace to CIE L*a*b* colourspace.
CIE L*u*v* Colourspace

colour

XYZ_to_Luv(XYZ[, illuminant]) Converts from CIE XYZ tristimulus values to CIE L*u*v* colourspace.
Luv_to_XYZ(Luv[, illuminant]) Converts from CIE L*u*v* colourspace to CIE XYZ tristimulus values.
Luv_to_LCHuv(Luv) Converts from CIE L*u*v* colourspace to CIE L*C*Huv colourspace.
LCHuv_to_Luv(LCHuv) Converts from CIE L*C*Huv colourspace to CIE L*u*v* colourspace.
Luv_to_uv(Luv[, illuminant]) Returns the \(uv^p\) chromaticity coordinates from given CIE L*u*v* colourspace array.
Luv_uv_to_xy(uv) Returns the xy chromaticity coordinates from given CIE L*u*v* colourspace \(uv^p\) chromaticity coordinates.
xy_to_Luv_uv(xy) Returns the CIE L*u*v* colourspace \(uv^p\) chromaticity coordinates from given xy chromaticity coordinates.
CIE 1960 UCS Colourspace

colour

XYZ_to_UCS(XYZ) Converts from CIE XYZ tristimulus values to CIE 1960 UCS colourspace.
UCS_to_XYZ(UVW) Converts from CIE 1960 UCS colourspace to CIE XYZ tristimulus values.
UCS_to_uv(UVW) Returns the uv chromaticity coordinates from given CIE 1960 UCS colourspace array.
UCS_uv_to_xy(uv) Returns the xy chromaticity coordinates from given CIE 1960 UCS colourspace uv chromaticity coordinates.
xy_to_UCS_uv(xy) Returns the CIE 1960 UCS colourspace uv chromaticity coordinates from given xy chromaticity coordinates.
CIE 1964 U*V*W* Colourspace

colour

XYZ_to_UVW(XYZ[, illuminant]) Converts from CIE XYZ tristimulus values to CIE 1964 U*V*W* colourspace.
UVW_to_XYZ(UVW[, illuminant]) Converts CIE 1964 U*V*W* colourspace to CIE XYZ tristimulus values.
Hunter L,a,b Colour Scale

colour

XYZ_to_Hunter_Lab(XYZ[, XYZ_n, K_ab]) Converts from CIE XYZ tristimulus values to Hunter L,a,b colour scale.
Hunter_Lab_to_XYZ(Lab[, XYZ_n, K_ab]) Converts from Hunter L,a,b colour scale to CIE XYZ tristimulus values.
XYZ_to_K_ab_HunterLab1966(XYZ) Converts from whitepoint CIE XYZ tristimulus values to Hunter L,a,b \(K_{a}\) and \(K_{b}\) chromaticity coefficients.
Hunter Rd,a,b Colour Scale

colour

XYZ_to_Hunter_Rdab(XYZ[, XYZ_n, K_ab]) Converts from CIE XYZ tristimulus values to Hunter Rd,a,b colour scale.
Hunter_Rdab_to_XYZ(R_d_ab[, XYZ_n, K_ab]) Converts from Hunter Rd,a,b colour scale to CIE XYZ tristimulus values.
DIN99 Colourspace

colour

Lab_to_DIN99(Lab[, k_E, k_CH]) Converts from CIE L*a*b* colourspace to DIN99 colourspace.
DIN99_to_Lab(Lab_99[, k_E, k_CH]) Converts from DIN99 colourspace to CIE L*a*b* colourspace.
CAM02-LCD, CAM02-SCD, and CAM02-UCS Colourspaces - Luo, Cui and Li (2006)

colour

JMh_CIECAM02_to_CAM02LCD(JMh) Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-LCD colourspace \(J'a'b'\) array..
CAM02LCD_to_JMh_CIECAM02(Jpapbp) Converts from Luo et al.(2006) CAM02-LCD colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array..
JMh_CIECAM02_to_CAM02SCD(JMh) Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-SCD colourspace \(J'a'b'\) array..
CAM02SCD_to_JMh_CIECAM02(Jpapbp) Converts from Luo et al.(2006) CAM02-SCD colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array..
JMh_CIECAM02_to_CAM02UCS(JMh) Converts from CIECAM02 \(JMh\) correlates array to Luo et al.(2006) CAM02-UCS colourspace \(J'a'b'\) array..
CAM02UCS_to_JMh_CIECAM02(Jpapbp) Converts from Luo et al.(2006) CAM02-UCS colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array..
CAM16-LCD, CAM16-SCD, and CAM16-UCS Colourspaces - Li et al. (2017)

colour

JMh_CAM16_to_CAM16LCD(JMh, *[, …]) Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-LCD colourspace \(J'a'b'\) array..
CAM16LCD_to_JMh_CAM16(Jpapbp, *[, …]) Converts from Li et al.(2017) CAM16-LCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array..
JMh_CAM16_to_CAM16SCD(JMh, *[, …]) Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-SCD colourspace \(J'a'b'\) array..
CAM16SCD_to_JMh_CAM16(Jpapbp, *[, …]) Converts from Li et al.(2017) CAM16-SCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array..
JMh_CAM16_to_CAM16UCS(JMh, *[, …]) Converts from CAM16 \(JMh\) correlates array to Li et al.(2017) CAM16-UCS colourspace \(J'a'b'\) array..
CAM16UCS_to_JMh_CAM16(Jpapbp, *[, …]) Converts from Li et al.(2017) CAM16-UCS colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array..
IPT Colourspace

colour

XYZ_to_IPT(XYZ) Converts from CIE XYZ tristimulus values to IPT colourspace.
IPT_to_XYZ(IPT) Converts from IPT colourspace to CIE XYZ tristimulus values.
IPT_hue_angle(IPT) Computes the hue angle in degrees from IPT colourspace.
hdr-CIELAB Colourspace

colour

XYZ_to_hdr_CIELab(XYZ[, illuminant, Y_s, …]) Converts from CIE XYZ tristimulus values to hdr-CIELAB colourspace.
hdr_CIELab_to_XYZ(Lab_hdr[, illuminant, …]) Converts from hdr-CIELAB colourspace to CIE XYZ tristimulus values.
HDR_CIELAB_METHODS Supported hdr-CIELAB colourspace computation methods.
hdr-IPT Colourspace

colour

XYZ_to_hdr_IPT(XYZ[, Y_s, Y_abs, method]) Converts from CIE XYZ tristimulus values to hdr-IPT colourspace.
hdr_IPT_to_XYZ(IPT_hdr[, Y_s, Y_abs, method]) Converts from hdr-IPT colourspace to CIE XYZ tristimulus values.
HDR_IPT_METHODS Supported hdr-IPT colourspace computation methods.
OSA UCS Colourspace

colour

XYZ_to_OSA_UCS(XYZ) Converts from CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer to OSA UCS colourspace.
OSA_UCS_to_XYZ(Ljg[, optimisation_parameters]) Converts from OSA UCS colourspace to CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer.
\(JzAzBz\) Colourspace

colour

XYZ_to_JzAzBz(XYZ_D65[, constants]) Converts from CIE XYZ tristimulus values to \(J_zA_zB_z\) colourspace.
JzAzBz_to_XYZ(JzAzBz[, constants]) Converts from \(J_zA_zB_z\) colourspace to CIE XYZ tristimulus values.
RGB Colourspace and Transformations

colour

XYZ_to_RGB(XYZ, illuminant_XYZ, …[, …]) Converts from CIE XYZ tristimulus values to RGB colourspace array.
RGB_to_XYZ(RGB, illuminant_RGB, …[, …]) Converts given RGB colourspace array to CIE XYZ tristimulus values.
RGB_to_RGB(RGB, input_colourspace, …[, …]) Converts given RGB colourspace array from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method.
RGB_to_RGB_matrix(input_colourspace, …[, …]) Computes the matrix \(M\) converting from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method.

Ancillary Objects

colour

XYZ_to_sRGB(XYZ[, illuminant, …]) Converts from CIE XYZ tristimulus values to sRGB colourspace.
sRGB_to_XYZ(RGB[, illuminant, …]) Converts from sRGB colourspace to CIE XYZ tristimulus values.
RGB Colourspace Derivation

colour

normalised_primary_matrix(primaries, whitepoint) Returns the normalised primary matrix using given primaries and whitepoint \(xy\) chromaticity coordinates.
chromatically_adapted_primaries(primaries, …) Chromatically adapts given primaries \(xy\) chromaticity coordinates from test whitepoint_t to reference whitepoint_r.
primaries_whitepoint(npm) Returns the primaries and whitepoint \(xy\) chromaticity coordinates using given normalised primary matrix.
RGB_luminance(RGB, primaries, whitepoint) Returns the luminance \(Y\) of given RGB components from given primaries and whitepoint.
RGB_luminance_equation(primaries, whitepoint) Returns the luminance equation from given primaries and whitepoint.
RGB Colourspaces

colour

RGB_Colourspace(name, primaries, whitepoint) Implements support for the RGB colourspaces dataset from colour.models.dataset.aces_rgb, etc….
RGB_COLOURSPACES Aggregated RGB colourspaces.

colour.models

ACES_2065_1_COLOURSPACE ACES2065-1 colourspace, base encoding, used for exchange of full fidelity images and archiving.
ACES_CC_COLOURSPACE ACEScc colourspace, a working space for color correctors, target for ASC-CDL values created on-set.
ACES_CCT_COLOURSPACE ACEScct colourspace, an alternative working space for colour correctors, intended to be transient and internal to software or hardware systems, and is specifically not intended for interchange or archiving.
ACES_PROXY_COLOURSPACE ACESproxy colourspace, a lightweight encoding for transmission over HD-SDI (or other production transmission schemes), onset look management.
ACES_CG_COLOURSPACE ACEScg colourspace, a working space for paint/compositor applications that don’t support ACES2065-1 or ACEScc.
ADOBE_RGB_1998_COLOURSPACE Adobe RGB (1998) colourspace.
ADOBE_WIDE_GAMUT_RGB_COLOURSPACE Adobe Wide Gamut RGB colourspace.
ALEXA_WIDE_GAMUT_COLOURSPACE ALEXA Wide Gamut colourspace.
APPLE_RGB_COLOURSPACE Apple RGB colourspace.
BEST_RGB_COLOURSPACE Best RGB colourspace.
BETA_RGB_COLOURSPACE Beta RGB colourspace.
BT470_525_COLOURSPACE ITU-R BT.470 - 525 colourspace.
BT470_625_COLOURSPACE ITU-R BT.470 - 625 colourspace.
BT709_COLOURSPACE ITU-R BT.709 colourspace.
BT2020_COLOURSPACE ITU-R BT.2020 colourspace.
CIE_RGB_COLOURSPACE CIE RGB colourspace.
CINEMA_GAMUT_COLOURSPACE Cinema Gamut colourspace.
COLOR_MATCH_RGB_COLOURSPACE ColorMatch RGB colourspace.
DCDM_XYZ_COLOURSPACE DCDM XYZ colourspace.
DCI_P3_COLOURSPACE DCI-P3 colourspace.
DCI_P3_P_COLOURSPACE DCI-P3+ colourspace.
DON_RGB_4_COLOURSPACE Don RGB 4 colourspace.
ECI_RGB_V2_COLOURSPACE ECI RGB v2 colourspace.
EKTA_SPACE_PS_5_COLOURSPACE Ekta Space PS 5 colourspace.
PROTUNE_NATIVE_COLOURSPACE Protune Native colourspace.
MAX_RGB_COLOURSPACE Max RGB colourspace.
NTSC_COLOURSPACE NTSC colourspace.
P3_D65_COLOURSPACE P3-D65 colourspace.
PAL_SECAM_COLOURSPACE Pal/Secam colourspace.
RED_COLOR_COLOURSPACE REDcolor colourspace.
RED_COLOR_2_COLOURSPACE REDcolor2 colourspace.
RED_COLOR_3_COLOURSPACE REDcolor3 colourspace.
RED_COLOR_4_COLOURSPACE REDcolor4 colourspace.
RED_WIDE_GAMUT_RGB_COLOURSPACE REDWideGamutRGB colourspace.
DRAGON_COLOR_COLOURSPACE DRAGONcolor colourspace.
DRAGON_COLOR_2_COLOURSPACE DRAGONcolor2 colourspace.
ROMM_RGB_COLOURSPACE ROMM RGB colourspace.
RIMM_RGB_COLOURSPACE RIMM RGB colourspace.
ERIMM_RGB_COLOURSPACE ERIMM RGB colourspace.
PROPHOTO_RGB_COLOURSPACE ProPhoto RGB colourspace, an alias colourspace for ROMM RGB.
RUSSELL_RGB_COLOURSPACE Russell RGB colourspace.
SMPTE_240M_COLOURSPACE SMPTE 240M colourspace.
S_GAMUT_COLOURSPACE S-Gamut colourspace.
S_GAMUT3_COLOURSPACE S-Gamut3 colourspace.
S_GAMUT3_CINE_COLOURSPACE S-Gamut3.Cine colourspace.
sRGB_COLOURSPACE sRGB colourspace.
V_GAMUT_COLOURSPACE V-Gamut colourspace.
XTREME_RGB_COLOURSPACE Xtreme RGB colourspace.
Colour Component Transfer Functions

colour

encoding_cctf(value[, function]) Encodes linear \(RGB\) values to non linear \(R'G'B'\) values using given encoding colour component transfer function (Encoding CCTF).
ENCODING_CCTFS Supported encoding colour component transfer functions (Encoding CCTFs), a collection of the functions defined by colour.LOG_ENCODING_CURVES, colour.OETFS, colour.EOTFS_REVERSE attributes and 3 gamma encoding functions (1 / 2.2, 1 / 2.4, 1 / 2.6).
decoding_cctf(value[, function]) Decodes non-linear \(R'G'B'\) values to linear \(RGB\) values using given decoding colour component transfer function (Decoding CCTF).
DECODING_CCTFS Supported decoding colour component transfer functions (Decoding CCTFs), a collection of the functions defined by colour.LOG_DECODING_CURVES, colour.EOTFS, colour.OETFS_REVERSE attributes and 3 gamma decoding functions (2.2, 2.4, 2.6).
Opto-Electronic Transfer Functions

colour

oetf(value[, function]) Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given opto-electronic transfer function (OETF / OECF).
OETFS Supported opto-electrical transfer functions (OETFs / OECFs).
oetf_reverse(value[, function]) Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given reverse opto-electronic transfer function (OETF / OECF).
OETFS_REVERSE Supported reverse opto-electrical transfer functions (OETFs / OECFs).

colour.models

oetf_ARIBSTDB67(E[, r, constants]) Defines ARIB STD-B67 (Hybrid Log-Gamma) opto-electrical transfer function (OETF / OECF).
oetf_reverse_ARIBSTDB67(E_p[, r, constants]) Defines ARIB STD-B67 (Hybrid Log-Gamma) reverse opto-electrical transfer function (OETF / OECF).
oetf_DICOMGSDF(L[, out_int]) Defines the DICOM - Grayscale Standard Display Function opto-electronic transfer function (OETF / OECF).
oetf_BT2020(E[, is_12_bits_system, constants]) Defines Recommendation ITU-R BT.2020 opto-electrical transfer function (OETF / OECF).
oetf_BT2100_HLG(E) Defines Recommendation ITU-R BT.2100 Reference HLG opto-electrical transfer function (OETF / OECF).
oetf_reverse_BT2100_HLG(E) Defines Recommendation ITU-R BT.2100 Reference HLG reverse opto-electrical transfer function (OETF / OECF).
oetf_BT2100_PQ(E) Defines Recommendation ITU-R BT.2100 Reference PQ opto-electrical transfer function (OETF / OECF).
oetf_reverse_BT2100_PQ(E_p) Defines Recommendation ITU-R BT.2100 Reference PQ reverse opto-electrical transfer function (OETF / OECF).
oetf_BT601(L) Defines Recommendation ITU-R BT.601-7 opto-electronic transfer function (OETF / OECF).
oetf_reverse_BT601(E) Defines Recommendation ITU-R BT.601-7 reverse opto-electronic transfer function (OETF / OECF).
oetf_BT709(L) Defines Recommendation ITU-R BT.709-6 opto-electronic transfer function (OETF / OECF).
oetf_reverse_BT709(V) Defines Recommendation ITU-R BT.709-6 reverse opto-electronic transfer function (OETF / OECF).
oetf_ProPhotoRGB(X[, bit_depth, out_int]) Defines the ROMM RGB encoding opto-electronic transfer function (OETF / OECF).
oetf_RIMMRGB(X[, bit_depth, out_int, E_clip]) Defines the RIMM RGB encoding opto-electronic transfer function (OETF / OECF).
oetf_ROMMRGB(X[, bit_depth, out_int]) Defines the ROMM RGB encoding opto-electronic transfer function (OETF / OECF).
oetf_SMPTE240M(L_c) Defines SMPTE 240M opto-electrical transfer function (OETF / OECF).
oetf_ST2084(C[, L_p, constants]) Defines SMPTE ST 2084:2014 optimised perceptual opto-electronic transfer function (OETF / OECF).
oetf_sRGB(L) Defines the sRGB colourspace opto-electronic transfer function (OETF / OECF).
oetf_reverse_sRGB(V) Defines the sRGB colourspace reverse opto-electronic transfer function (OETF / OECF).

Ancillary Objects

colour

gamma_function(a[, exponent, …]) Defines a typical gamma encoding / decoding function.
linear_function(a) Defines a typical linear encoding / decoding function, essentially a pass-through function.
Electro-Optical Transfer Functions

colour

eotf(value[, function]) Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given electro-optical transfer function (EOTF / EOCF).
EOTFS Supported electro-optical transfer functions (EOTFs / EOCFs).
eotf_reverse(value[, function]) Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given reverse electro-optical transfer function (EOTF / EOCF).
EOTFS_REVERSE Supported reverse electro-optical transfer functions (EOTFs / EOCFs).

colour.models

eotf_DCDM(XYZ_p[, in_int]) Defines the DCDM electro-optical transfer function (EOTF / EOCF).
eotf_reverse_DCDM(XYZ[, out_int]) Defines the DCDM reverse electro-optical transfer function (EOTF / EOCF).
eotf_DICOMGSDF(J[, in_int]) Defines the DICOM - Grayscale Standard Display Function electro-optical transfer function (EOTF / EOCF).
eotf_BT1886(V[, L_B, L_W]) Defines Recommendation ITU-R BT.1886 electro-optical transfer function (EOTF / EOCF).
eotf_reverse_BT1886(L[, L_B, L_W]) Defines Recommendation ITU-R BT.1886 reverse electro-optical transfer function (EOTF / EOCF).
eotf_BT2020(E_p[, is_12_bits_system, constants]) Defines Recommendation ITU-R BT.2020 electro-optical transfer function (EOTF / EOCF).
eotf_BT2100_HLG(E_p[, L_B, L_W, gamma]) Defines Recommendation ITU-R BT.2100 Reference HLG electro-optical transfer function (EOTF / EOCF).
eotf_reverse_BT2100_HLG(F_D[, L_B, L_W, gamma]) Defines Recommendation ITU-R BT.2100 Reference HLG reverse electro-optical transfer function (EOTF / EOCF).
eotf_BT2100_PQ(E_p) Defines Recommendation ITU-R BT.2100 Reference PQ electro-optical transfer function (EOTF / EOCF).
eotf_reverse_BT2100_PQ(F_D) Defines Recommendation ITU-R BT.2100 Reference PQ reverse electro-optical transfer function (EOTF / EOCF).
eotf_ProPhotoRGB(X_p[, bit_depth, in_int]) Defines the ROMM RGB encoding electro-optical transfer function (EOTF / EOCF).
eotf_RIMMRGB(X_p[, bit_depth, in_int, E_clip]) Defines the RIMM RGB encoding electro-optical transfer function (EOTF / EOCF).
eotf_ROMMRGB(X_p[, bit_depth, in_int]) Defines the ROMM RGB encoding electro-optical transfer function (EOTF / EOCF).
eotf_SMPTE240M(V_r) Defines SMPTE 240M electro-optical transfer function (EOTF / EOCF).
eotf_ST2084(N[, L_p, constants]) Defines SMPTE ST 2084:2014 optimised perceptual electro-optical transfer function (EOTF / EOCF).
Opto-Optical Transfer Functions

colour

ootf(value[, function]) Maps relative scene linear light to display linear light using given opto-optical transfer function (OOTF / OOCF).
OOTFS Supported opto-optical transfer functions (OOTFs / OOCFs).
ootf_reverse(value[, function]) Maps relative display linear light to scene linear light using given reverse opto-optical transfer function (OOTF / OOCF).
OOTFS_REVERSE Supported reverse opto-optical transfer functions (OOTFs / OOCFs).

colour.models

ootf_BT2100_HLG(E[, L_B, L_W, gamma]) Defines Recommendation ITU-R BT.2100 Reference HLG opto-optical transfer function (OOTF / OOCF).
ootf_reverse_BT2100_HLG(F_D[, L_B, L_W, gamma]) Defines Recommendation ITU-R BT.2100 Reference HLG reverse opto-optical transfer function (OOTF / OOCF).
ootf_BT2100_PQ(E) Defines Recommendation ITU-R BT.2100 Reference PQ opto-optical transfer function (OOTF / OOCF).
ootf_reverse_BT2100_PQ(F_D) Defines Recommendation ITU-R BT.2100 Reference PQ reverse opto-optical transfer function (OOTF / OOCF).
Log Encoding and Decoding Curves

colour

log_encoding_curve(value[, curve]) Encodes linear-light values to \(R'G'B'\) video component signal value using given log curve.
LOG_ENCODING_CURVES Supported log encoding curves.
log_decoding_curve(value[, curve]) Decodes \(R'G'B'\) video component signal value to linear-light values using given log curve.
LOG_DECODING_CURVES Supported log decoding curves.

colour.models

log_encoding_ACEScc(lin_AP1) Defines the ACEScc colourspace log encoding / opto-electronic transfer function.
log_decoding_ACEScc(ACEScc) Defines the ACEScc colourspace log decoding / electro-optical transfer function.
log_encoding_ACEScct(lin_AP1[, constants]) Defines the ACEScct colourspace log encoding / opto-electronic transfer function.
log_decoding_ACEScct(ACEScct[, constants]) Defines the ACEScct colourspace log decoding / electro-optical transfer function.
log_encoding_ACESproxy(lin_AP1[, bit_depth, …]) Defines the ACESproxy colourspace log encoding curve / opto-electronic transfer function.
log_decoding_ACESproxy(ACESproxy[, …]) Defines the ACESproxy colourspace log decoding curve / electro-optical transfer function.
log_encoding_ALEXALogC(x[, firmware, method, EI]) Defines the ALEXA Log C log encoding curve / opto-electronic transfer function.
log_decoding_ALEXALogC(t[, firmware, method, EI]) Defines the ALEXA Log C log decoding curve / electro-optical transfer function.
log_encoding_CanonLog2(x[, bit_depth, …]) Defines the Canon Log 2 log encoding curve / opto-electronic transfer function.
log_decoding_CanonLog2(clog2[, bit_depth, …]) Defines the Canon Log 2 log decoding curve / electro-optical transfer function.
log_encoding_CanonLog3(x[, bit_depth, …]) Defines the Canon Log 3 log encoding curve / opto-electronic transfer function.
log_decoding_CanonLog3(clog3[, bit_depth, …]) Defines the Canon Log 3 log decoding curve / electro-optical transfer function.
log_encoding_CanonLog(x[, bit_depth, …]) Defines the Canon Log log encoding curve / opto-electronic transfer function.
log_decoding_CanonLog(clog[, bit_depth, …]) Defines the Canon Log log decoding curve / electro-optical transfer function.
log_encoding_Cineon(x[, black_offset]) Defines the Cineon log encoding curve / opto-electronic transfer function.
log_decoding_Cineon(y[, black_offset]) Defines the Cineon log decoding curve / electro-optical transfer function.
log_encoding_ERIMMRGB(X[, bit_depth, …]) Defines the ERIMM RGB log encoding curve / opto-electronic transfer function (OETF / OECF).
log_decoding_ERIMMRGB(X_p[, bit_depth, …]) Defines the ERIMM RGB log decoding curve / electro-optical transfer function (EOTF / EOCF).
log_encoding_Log3G10(x[, legacy_curve]) Defines the Log3G10 log encoding curve / opto-electronic transfer function.
log_decoding_Log3G10(y[, legacy_curve]) Defines the Log3G10 log decoding curve / electro-optical transfer function.
log_encoding_Log3G12(x) Defines the Log3G12 log encoding curve / opto-electronic transfer function.
log_decoding_Log3G12(y) Defines the Log3G12 log decoding curve / electro-optical transfer function.
log_encoding_Panalog(x[, black_offset]) Defines the Panalog log encoding curve / opto-electronic transfer function.
log_decoding_Panalog(y[, black_offset]) Defines the Panalog log decoding curve / electro-optical transfer function.
log_encoding_PivotedLog(x[, log_reference, …]) Defines the Josh Pines style Pivoted Log log encoding curve / opto-electronic transfer function.
log_decoding_PivotedLog(y[, log_reference, …]) Defines the Josh Pines style Pivoted Log log decoding curve / electro-optical transfer function.
log_encoding_Protune(x) Defines the Protune log encoding curve / opto-electronic transfer function.
log_decoding_Protune(y) Defines the Protune log decoding curve / electro-optical transfer function.
log_encoding_REDLog(x[, black_offset]) Defines the REDLog log encoding curve / opto-electronic transfer function.
log_decoding_REDLog(y[, black_offset]) Defines the REDLog log decoding curve / electro-optical transfer function.
log_encoding_REDLogFilm(x[, black_offset]) Defines the REDLogFilm log encoding curve / opto-electronic transfer function.
log_decoding_REDLogFilm(y[, black_offset]) Defines the REDLogFilm log decoding curve / electro-optical transfer function.
log_encoding_SLog(x[, bit_depth, out_legal, …]) Defines the Sony S-Log log encoding curve / opto-electronic transfer function.
log_decoding_SLog(y[, bit_depth, in_legal, …]) Defines the Sony S-Log log decoding curve / electro-optical transfer function.
log_encoding_SLog2(x[, bit_depth, …]) Defines the Sony S-Log2 log encoding curve / opto-electronic transfer function.
log_decoding_SLog2(y[, bit_depth, in_legal, …]) Defines the Sony S-Log2 log decoding curve / electro-optical transfer function.
log_encoding_SLog3(x[, bit_depth, …]) Defines the Sony S-Log3 log encoding curve / opto-electronic transfer function.
log_decoding_SLog3(y[, bit_depth, in_legal, …]) Defines the Sony S-Log3 log decoding curve / electro-optical transfer function.
log_encoding_VLog(L_in[, bit_depth, …]) Defines the Panasonic V-Log log encoding curve / opto-electronic transfer function.
log_decoding_VLog(V_out[, bit_depth, …]) Defines the Panasonic V-Log log decoding curve / electro-optical transfer function.
log_encoding_ViperLog(x) Defines the Viper Log log encoding curve / opto-electronic transfer function.
log_decoding_ViperLog(y) Defines the Viper Log log decoding curve / electro-optical transfer function.
ACES Spectral Conversion

colour

sd_to_aces_relative_exposure_values(sd[, …]) Converts given spectral distribution to ACES2065-1 colourspace relative exposure values.

Ancillary Objects

colour.models

ACES_RICD Implements support for the CIE RGB colour matching functions.
Colour Encodings
Y’CbCr Colour Encoding

colour

RGB_to_YCbCr(RGB[, K, in_bits, in_legal, …]) Converts an array of R’G’B’ values to the corresponding Y’CbCr colour encoding values array.
YCbCr_to_RGB(YCbCr[, K, in_bits, in_legal, …]) Converts an array of Y’CbCr colour encoding values to the corresponding R’G’B’ values array.
YCBCR_WEIGHTS Implements a case-insensitive mutable mapping / dict object.
RGB_to_YcCbcCrc(RGB[, out_bits, out_legal, …]) Converts an array of RGB linear values to the corresponding Yc’Cbc’Crc’ colour encoding values array.
YcCbcCrc_to_RGB(YcCbcCrc[, in_bits, …]) Converts an array of Yc’Cbc’Crc’ colour encoding values to the corresponding RGB array of linear values.

Ancillary Objects

colour

full_to_legal(CV[, bit_depth, in_int, out_int]) Converts given code value \(CV\) or float equivalent of a code value at a given bit depth from full range (full swing) to legal range (studio swing).
legal_to_full(CV[, bit_depth, in_int, out_int]) Converts given code value \(CV\) or float equivalent of a code value at a given bit depth from legal range (studio swing) to full range (full swing).
CV_range([bit_depth, is_legal, is_int]) Returns the code value \(CV\) range for given bit depth, range legality and representation.
YCoCg Colour Encoding

colour

RGB_to_YCoCg(RGB) Converts an array of R’G’B’ values to the corresponding YCoCg colour encoding values array.
YCoCg_to_RGB(YCoCg) Converts an array of YCoCg colour encoding values to the corresponding R’G’B’ values array.
\(IC_TC_P\) Colour Encoding

colour

RGB_to_ICTCP(RGB[, L_p]) Converts from ITU-R BT.2020 colourspace to \(IC_TC_P\) colour encoding.
ICTCP_to_RGB(ICTCP[, L_p]) Converts from \(IC_TC_P\) colour encoding to ITU-R BT.2020 colourspace.
RGB Representations
Prismatic Colourspace

colour

RGB_to_Prismatic(RGB) Converts from RGB colourspace to Prismatic \(L\rho\gamma\beta\) colourspace array.
Prismatic_to_RGB(Lrgb) Converts from Prismatic \(L\rho\gamma\beta\) colourspace array to RGB colourspace.
HSV Colourspace

colour

RGB_to_HSV(RGB) Converts from RGB colourspace to HSV colourspace.
HSV_to_RGB(HSV) Converts from HSV colourspace to RGB colourspace.
HSL Colourspace

colour

RGB_to_HSL(RGB) Converts from RGB colourspace to HSL colourspace.
HSL_to_RGB(HSL) Converts from HSL colourspace to RGB colourspace.
CMY Colourspace

colour

RGB_to_CMY(RGB) Converts from RGB colourspace to CMY colourspace.
CMY_to_RGB(CMY) Converts from CMY colourspace to CMY colourspace.
CMY_to_CMYK(CMY) Converts from CMY colourspace to CMYK colourspace.
CMYK_to_CMY(CMYK) Converts from CMYK colourspace to CMY colourspace.
Colour Notation Systems
Munsell Renotation System

colour

munsell_colour_to_xyY(munsell_colour) Converts given Munsell colour to CIE xyY colourspace.
xyY_to_munsell_colour(xyY[, hue_decimals, …]) Converts from CIE xyY colourspace to Munsell colour.

Dataset

colour

MUNSELL_COLOURS Aggregated Munsell colours.
Munsell Value

colour

munsell_value(Y[, method]) Returns the Munsell value \(V\) of given luminance \(Y\) using given method.
MUNSELL_VALUE_METHODS Supported Munsell value computations methods.
Priest, Gibson and MacNicholas (1920)

colour.notation

munsell_value_Priest1920(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using Priest et al.(1920) method..
Munsell, Sloan and Godlove (1933)

colour.notation

munsell_value_Munsell1933(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using Munsell et al.(1933) method..
Moon and Spencer (1943)

colour.notation

munsell_value_Moon1943(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using Moon and Spencer (1943) method.
Saunderson and Milner (1944)

colour.notation

munsell_value_Saunderson1944(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using Saunderson and Milner (1944) method.
Ladd and Pinney (1955)

colour.notation

munsell_value_Ladd1955(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using Ladd and Pinney (1955) method.
McCamy (1987)

colour.notation

munsell_value_McCamy1987(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using McCamy (1987) method.
ASTM D1535-08e1

colour.notation

munsell_value_ASTMD153508(Y) Returns the Munsell value \(V\) of given luminance \(Y\) using a reverse lookup table from ASTM D1535-08e1 method.
Hexadecimal Triplet Notation

colour.notation

RGB_to_HEX(RGB) Converts from RGB colourspace to hexadecimal triplet representation.
HEX_to_RGB(HEX) Converts from hexadecimal triplet representation to RGB colourspace.
Optical Phenomena
Rayleigh Scattering

colour

rayleigh_scattering(wavelength[, …]) Returns the Rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm).
sd_rayleigh_scattering([shape, …]) Returns the Rayleigh spectral distribution for given spectral shape.
scattering_cross_section(wavelength[, …]) Returns the scattering cross section per molecule \(\sigma\) of dry air as function of wavelength \(\lambda\) in centimeters (cm) using given \(CO_2\) concentration in parts per million (ppm) and temperature \(T[K]\) in kelvin degrees following Van de Hulst (1957) method.

colour.phenomena

rayleigh_optical_depth(wavelength[, …]) Returns the Rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm).
Plotting
Common

colour.plotting

colour_style([use_style]) Returns Colour plotting style.
colour_cycle(**kwargs) Returns a colour cycle iterator using given colour map.
artist(**kwargs) Returns the current figure and its axes or creates a new one.
camera(**kwargs) Sets the camera settings.
render(**kwargs) Renders the current figure while adjusting various settings such as the bounding box, the title or background transparency.
label_rectangles(labels, rectangles[, …]) Add labels above given rectangles.
uniform_axes3d(axes) Sets equal aspect ratio to given 3d axes.
plot_single_colour_swatch(colour_swatch, …) Plots given colour swatch.
plot_multi_colour_swatches(colour_swatches) Plots given colours swatches.
plot_single_function(function[, samples, …]) Plots given function.
plot_multi_functions(functions[, samples, …]) Plots given functions.
plot_image(image[, text_parameters, …]) Plots given image.
Colorimetry

colour.plotting

plot_single_sd(sd[, cmfs, out_of_gamut_clipping]) Plots given spectral distribution.
plot_multi_sds(sds[, cmfs, use_sds_colours, …]) Plots given spectral distributions.
plot_single_cmfs([cmfs]) Plots given colour matching functions.
plot_multi_cmfs([cmfs]) Plots given colour matching functions.
plot_single_illuminant_sd([illuminant, cmfs]) Plots given single illuminant spectral distribution.
plot_multi_illuminant_sds([illuminants]) Plots given illuminants spectral distributions.
plot_visible_spectrum([cmfs, …]) Plots the visible colours spectrum using given standard observer CIE XYZ colour matching functions.
plot_single_lightness_function([function]) Plots given Lightness function.
plot_multi_lightness_functions([functions]) Plots given Lightness functions.
plot_single_luminance_function([function]) Plots given Luminance function.
plot_multi_luminance_functions([functions]) Plots given Luminance functions.
plot_blackbody_spectral_radiance([…]) Plots given blackbody spectral radiance.
plot_blackbody_colours([shape, cmfs]) Plots blackbody colours.
Colour Vision Deficiency

colour.plotting

plot_cvd_simulation_Machado2009(RGB[, …]) Performs colour vision deficiency simulation on given RGB colourspace array using Machado et al.(2009) model..
Colour Characterisation

colour.plotting

plot_single_colour_checker([colour_checker]) Plots given colour checker.
plot_multi_colour_checkers([colour_checkers]) Plots and compares given colour checkers.
Corresponding Chromaticities

colour.plotting

plot_corresponding_chromaticities_prediction([…]) Plots given chromatic adaptation model corresponding chromaticities prediction.
CIE Chromaticity Diagrams

colour.plotting

plot_chromaticity_diagram_CIE1931([cmfs, …]) Plots the CIE 1931 Chromaticity Diagram.
plot_chromaticity_diagram_CIE1960UCS([cmfs, …]) Plots the CIE 1960 UCS Chromaticity Diagram.
plot_chromaticity_diagram_CIE1976UCS([cmfs, …]) Plots the CIE 1976 UCS Chromaticity Diagram.
plot_sds_in_chromaticity_diagram_CIE1931(sds) Plots given spectral distribution chromaticity coordinates into the CIE 1931 Chromaticity Diagram.
plot_sds_in_chromaticity_diagram_CIE1960UCS(sds) Plots given spectral distribution chromaticity coordinates into the CIE 1960 UCS Chromaticity Diagram.
plot_sds_in_chromaticity_diagram_CIE1976UCS(sds) Plots given spectral distribution chromaticity coordinates into the CIE 1976 UCS Chromaticity Diagram.

Ancillary Objects

colour.plotting.diagrams

plot_spectral_locus([cmfs, …]) Plots the Spectral Locus according to given method.
plot_chromaticity_diagram_colours([samples, …]) Plots the Chromaticity Diagram colours according to given method.
plot_chromaticity_diagram([cmfs, …]) Plots the Chromaticity Diagram according to given method.
plot_sds_in_chromaticity_diagram(sds[, …]) Plots given spectral distribution chromaticity coordinates into the Chromaticity Diagram using given method.
Colour Models

colour.plotting

plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931([…]) Plots given RGB colourspaces in the CIE 1931 Chromaticity Diagram.
plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS([…]) Plots given RGB colourspaces in the CIE 1960 UCS Chromaticity Diagram.
plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS([…]) Plots given RGB colourspaces in the CIE 1976 UCS Chromaticity Diagram.
plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931(RGB) Plots given RGB colourspace array in the CIE 1931 Chromaticity Diagram.
plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS(RGB) Plots given RGB colourspace array in the CIE 1960 UCS Chromaticity Diagram.
plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS(RGB) Plots given RGB colourspace array in the CIE 1976 UCS Chromaticity Diagram.
plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931([…]) Plots MacAdam (1942) Ellipses (Observer PGN) in the CIE 1931 Chromaticity Diagram.
plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS([…]) Plots MacAdam (1942) Ellipses (Observer PGN) in the CIE 1960 UCS Chromaticity Diagram.
plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS([…]) Plots MacAdam (1942) Ellipses (Observer PGN) in the CIE 1976 UCS Chromaticity Diagram.
plot_single_cctf([cctf, decoding_cctf]) Plots given colourspace colour component transfer function.
plot_multi_cctfs([cctfs, decoding_cctf]) Plots given colour component transfer functions.

Ancillary Objects

colour.plotting.models

plot_pointer_gamut([method]) Plots Pointer’s Gamut according to given method.
plot_RGB_colourspaces_in_chromaticity_diagram([…]) Plots given RGB colourspaces in the Chromaticity Diagram according to given method.
plot_RGB_chromaticities_in_chromaticity_diagram(RGB) Plots given RGB colourspace array in the Chromaticity Diagram according to given method.
Colour Notation Systems

colour.plotting

plot_single_munsell_value_function([function]) Plots given Lightness function.
plot_multi_munsell_value_functions([functions]) Plots given Munsell value functions.
Optical Phenomena

colour.plotting

plot_single_sd_rayleigh_scattering([…]) Plots a single Rayleigh scattering spectral distribution.
plot_the_blue_sky([cmfs]) Plots the blue sky.
Colour Quality

colour.plotting

plot_single_sd_colour_rendering_index_bars(sd, …) Plots the Colour Rendering Index (CRI) of given illuminant or light source spectral distribution.
plot_multi_sds_colour_rendering_indexes_bars(…) Plots the Colour Rendering Index (CRI) of given illuminants or light sources spectral distributions.
plot_single_sd_colour_quality_scale_bars(sd, …) Plots the Colour Quality Scale (CQS) of given illuminant or light source spectral distribution.
plot_multi_sds_colour_quality_scales_bars(…) Plots the Colour Quality Scale (CQS) of given illuminants or light sources spectral distributions.

Ancillary Objects

colour.plotting.quality

plot_colour_quality_bars(specifications[, …]) Plots the colour quality data of given illuminants or light sources colour quality specifications.
Colour Temperature & Correlated Colour Temperature

colour.plotting

plot_planckian_locus_in_chromaticity_diagram_CIE1931([…]) Plots the Planckian Locus and given illuminants in CIE 1931 Chromaticity Diagram.
plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS([…]) Plots the Planckian Locus and given illuminants in CIE 1960 UCS Chromaticity Diagram.

Ancillary Objects

colour.plotting.temperature

plot_planckian_locus([…]) Plots the Planckian Locus according to given method.
plot_planckian_locus_in_chromaticity_diagram([…]) Plots the Planckian Locus and given illuminants in the Chromaticity Diagram according to given method.
Colour Models Volume

colour.plotting

plot_RGB_colourspaces_gamuts([colourspaces, …]) Plots given RGB colourspaces gamuts in given reference colourspace.
plot_RGB_scatter(RGB, colourspace[, …]) Plots given RGB colourspace array in a scatter plot.
Geometry Plotting Utilities

colour.plotting

quad([plane, origin, width, height, depth]) Returns the vertices of a quad geometric element in counter-clockwise order.
grid([plane, origin, width, height, depth, …]) Returns the vertices of a grid made of quads.
cube([plane, origin, width, height, depth, …]) Returns the vertices of a cube made of grids.
Colour Quality
Colour Rendering Index

colour

colour_rendering_index(sd_test[, …]) Returns the Colour Rendering Index (CRI) \(Q_a\) of given spectral distribution.

colour.quality

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

colour

colour_quality_scale(sd_test[, additional_data]) Returns the Colour Quality Scale (CQS) of given spectral distribution.

colour.quality

CQS_Specification Defines the Colour Quality Scale (CQS) colour quality specification.
Reflectance Recovery
CIE XYZ Colourspace to Spectral

colour

XYZ_to_sd(XYZ[, method]) Recovers the spectral distribution of given CIE XYZ tristimulus values using given method.
XYZ_TO_SD_METHODS Supported spectral distribution recovery methods.
Smits (1999)

colour.recovery

RGB_to_sd_Smits1999(RGB) Recovers the spectral distribution of given RGB colourspace array using Smits (1999) method.
SMITS_1999_SDS Smits (1999) spectral distributions.
Meng, Simon and Hanika (2015)

colour.recovery

XYZ_to_sd_Meng2015(XYZ[, cmfs, interval, …]) Recovers the spectral distribution of given CIE XYZ tristimulus values using Meng et al.(2015) method..
Colour Temperature
Correlated Colour Temperature

colour

CCT_to_uv(CCT[, method]) Returns the CIE UCS colourspace uv chromaticity coordinates from given correlated colour temperature \(T_{cp}\) using given method.
CCT_TO_UV_METHODS Supported correlated colour temperature \(T_{cp}\) to CIE UCS colourspace uv chromaticity coordinates computation methods.
uv_to_CCT(uv[, method]) Returns the correlated colour temperature \(T_{cp}\) and \(\Delta_{uv}\) from given CIE UCS colourspace uv chromaticity coordinates using given method.
UV_TO_CCT_METHODS Supported CIE UCS colourspace uv chromaticity coordinates to correlated colour temperature \(T_{cp}\) computation methods.
CCT_to_xy(CCT[, method]) Returns the CIE XYZ tristimulus values xy chromaticity coordinates from given correlated colour temperature \(T_{cp}\) using given method.
CCT_TO_XY_METHODS Supported correlated colour temperature \(T_{cp}\) to CIE XYZ tristimulus values xy chromaticity coordinates computation methods.
xy_to_CCT(xy[, method]) Returns the correlated colour temperature \(T_{cp}\) from given CIE XYZ tristimulus values xy chromaticity coordinates using given method.
XY_TO_CCT_METHODS Supported CIE XYZ tristimulus values xy chromaticity coordinates to correlated colour temperature \(T_{cp}\) computation methods.
Robertson (1968)

colour.temperature

CCT_to_uv_Robertson1968(CCT[, D_uv]) Returns the CIE UCS colourspace uv chromaticity coordinates from given correlated colour temperature \(T_{cp}\) and \(\Delta_{uv}\) using Roberston (1968) method.
uv_to_CCT_Robertson1968(uv) Returns the correlated colour temperature \(T_{cp}\) and \(\Delta_{uv}\) from given CIE UCS colourspace uv chromaticity coordinates using Roberston (1968) method.
Krystek (1985)

colour.temperature

CCT_to_uv_Krystek1985(CCT) Returns the CIE UCS colourspace uv chromaticity coordinates from given correlated colour temperature \(T_{cp}\) using Krystek (1985) method.
Ohno (2013)

colour.temperature

CCT_to_uv_Ohno2013(CCT[, D_uv, cmfs]) Returns the CIE UCS colourspace uv chromaticity coordinates from given correlated colour temperature \(T_{cp}\), \(\Delta_{uv}\) and colour matching functions using Ohno (2013) method.
uv_to_CCT_Ohno2013(uv[, cmfs, start, end, …]) Returns the correlated colour temperature \(T_{cp}\) and \(\Delta_{uv}\) from given CIE UCS colourspace uv chromaticity coordinates, colour matching functions and temperature range using Ohno (2013) method.
Hernandez-Andres, Lee and Romero (1999)

colour.temperature

xy_to_CCT_Hernandez1999(xy) Returns the correlated colour temperature \(T_{cp}\) from given CIE XYZ tristimulus values xy chromaticity coordinates using Hernandez-Andres et al.(1999) method..
Kang, Moon, Hong, Lee, Cho and Kim (2002)

colour.temperature

CCT_to_xy_Kang2002(CCT) Returns the CIE XYZ tristimulus values xy chromaticity coordinates from given correlated colour temperature \(T_{cp}\) using Kang et al.(2002) method..
CIE Illuminant D Series

colour.temperature

CCT_to_xy_CIE_D(CCT) Converts from the correlated colour temperature \(T_{cp}\) of a CIE Illuminant D Series to the chromaticity of that CIE Illuminant D Series illuminant.
Utilities
Common

colour

domain_range_scale(scale) A context manager and decorator temporarily setting Colour domain-range scale.
get_domain_range_scale() Returns the current Colour domain-range scale.
set_domain_range_scale([scale]) Sets the current Colour domain-range scale.

colour.utilities

handle_numpy_errors(**kwargs) Decorator for handling Numpy errors.
ignore_numpy_errors(function) Wrapper for given function.
raise_numpy_errors(function) Wrapper for given function.
print_numpy_errors(function) Wrapper for given function.
warn_numpy_errors(function) Wrapper for given function.
ignore_python_warnings(function) Decorator for ignoring Python warnings.
batch(iterable[, k]) Returns a batch generator from given iterable.
is_openimageio_installed([raise_exception]) Returns if OpenImageIO is installed and available.
is_pandas_installed([raise_exception]) Returns if Pandas is installed and available.
is_iterable(a) Returns if given \(a\) variable is iterable.
is_string(a) Returns if given \(a\) variable is a string like variable.
is_numeric(a) Returns if given \(a\) variable is a number.
is_integer(a) Returns if given \(a\) variable is an integer under given threshold.
is_sibling(element, mapping) Returns whether given element type is present in given mapping types.
filter_kwargs(function, **kwargs) Filters keyword arguments incompatible with the given function signature.
filter_mapping(mapping, filterers[, …]) Filters given mapping with given filterers.
first_item(a) Return the first item of an iterable.
to_domain_1(a[, scale_factor, dtype]) Scales given array \(a\) to domain ‘1’.
to_domain_10(a[, scale_factor, dtype]) Scales given array \(a\) to domain ‘10’, used by Munsell Renotation System.
to_domain_100(a[, scale_factor, dtype]) Scales given array \(a\) to domain ‘100’.
to_domain_degrees(a[, scale_factor, dtype]) Scales given array \(a\) to degrees domain.
to_domain_int(a[, bit_depth, dtype]) Scales given array \(a\) to int domain.
from_range_1(a[, scale_factor]) Scales given array \(a\) from range ‘1’.
from_range_10(a[, scale_factor]) Scales given array \(a\) from range ‘10’, used by Munsell Renotation System.
from_range_100(a[, scale_factor]) Scales given array \(a\) from range ‘100’.
from_range_degrees(a[, scale_factor]) Scales given array \(a\) from degrees range.
from_range_int(a[, bit_depth, dtype]) Scales given array \(a\) from int range.
Array

colour.utilities

as_array(a[, dtype]) Converts given \(a\) variable to ndarray with given type.
as_int_array(a) Converts given \(a\) variable to ndarray using the type defined by colour.constant.DEFAULT_INT_DTYPE attribute.
as_float_array(a) Converts given \(a\) variable to ndarray using the type defined by colour.constant.DEFAULT_FLOAT_DTYPE attribute.
as_numeric(a[, dtype]) Converts given \(a\) variable to numeric.
as_int(a) Converts given \(a\) variable to numeric using the type defined by colour.constant.DEFAULT_INT_DTYPE attribute.
as_float(a) Converts given \(a\) variable to numeric using the type defined by colour.constant.DEFAULT_FLOAT_DTYPE attribute.
as_namedtuple(a, named_tuple) Converts given \(a\) variable to given namedtuple class instance.
closest_indexes(a, b) Returns the \(a\) variable closest element indexes to reference \(b\) variable elements.
closest(a, b) Returns the \(a\) variable closest elements to reference \(b\) variable elements.
normalise_maximum(a[, axis, factor, clip]) Normalises given array_like \(a\) variable values by \(a\) variable maximum value and optionally clip them between.
interval(distribution[, unique]) Returns the interval size of given distribution.
is_uniform(distribution) Returns if given distribution is uniform.
in_array(a, b[, tolerance]) Tests whether each element of an array is also present in a second array within given tolerance.
tstack(a[, dtype]) Stacks arrays in sequence along the last axis (tail).
tsplit(a[, dtype]) Splits arrays in sequence along the last axis (tail).
row_as_diagonal(a) Returns the per row diagonal matrices of the given array.
dot_vector(m, v) Convenient wrapper around np.einsum() with the following subscripts: ‘…ij,…j->…i’.
dot_matrix(a, b) Convenient wrapper around np.einsum() with the following subscripts: ‘…ij,…jk->…ik’.
orient(a, orientation) Orient given array according to given orientation value.
centroid(a) Computes the centroid indexes of given \(a\) array.
linear_conversion(a, old_range, new_range) Performs a simple linear conversion of given array between the old and new ranges.
lerp(a, b, c) Performs a simple linear interpolation between given array \(a\) and array \(b\) using \(c\) value.
fill_nan(a[, method, default]) Fills given array NaNs according to given method.
ndarray_write(a) A context manager setting given array writeable to perform an operation and then read-only.
Metrics

colour.utilities

metric_mse(a, b) Computes the mean squared error (MSE) or mean squared deviation (MSD) between given array_like \(a\) and \(b\) variables.
metric_psnr(a, b[, max_a]) Computes the peak signal-to-noise ratio (PSNR) between given array_like \(a\) and \(b\) variables.
Data Structures

colour.utilities

CaseInsensitiveMapping([data]) Implements a case-insensitive mutable mapping / dict object.
Lookup Extends dict type to provide a lookup by value(s).
Structure(*args, **kwargs) Defines an object similar to C/C++ structured type.
Verbose

colour.utilities

message_box(message[, width, padding, …]) Prints a message inside a box.
warning(*args, **kwargs) Issues a warning.
filter_warnings([state, colour_warnings, …]) Filters Colour and also optionally overall Python warnings.
suppress_warnings([colour_warnings, …]) A context manager filtering Colour and also optionally overall Python warnings.
numpy_print_options(*args, **kwargs) A context manager implementing context changes to Numpy print behaviour.
describe_environment([runtime_packages, …]) Describes Colour running environment, i.e.

Ancillary Objects

colour.utilities

ColourWarning This is the base class of Colour warnings.
ColourUsageWarning This is the base class of Colour usage warnings.
ColourRuntimeWarning This is the base class of Colour runtime warnings.
Colour Volume
Optimal Colour Stimuli - MacAdam Limits

colour

is_within_macadam_limits(xyY, illuminant[, …]) Returns if given CIE xyY colourspace array is within MacAdam limits of given illuminant.
ILLUMINANTS_OPTIMAL_COLOUR_STIMULI Illuminants Optimal Colour Stimuli.
Mesh Volume

colour

is_within_mesh_volume(points, mesh[, tolerance]) Returns if given points are within given mesh volume using Delaunay triangulation.
Pointer’s Gamut

colour

is_within_pointer_gamut(XYZ[, tolerance]) Returns if given CIE XYZ tristimulus values are within Pointer’s Gamut volume.
RGB Volume

colour

RGB_colourspace_limits(colourspace[, illuminant]) Computes given RGB colourspace volume limits in Lab colourspace.
RGB_colourspace_pointer_gamut_coverage_MonteCarlo(…) Returns given RGB colourspace percentage coverage of Pointer’s Gamut volume using Monte Carlo method.
RGB_colourspace_visible_spectrum_coverage_MonteCarlo(…) Returns given RGB colourspace percentage coverage of visible spectrum volume using Monte Carlo method.
RGB_colourspace_volume_MonteCarlo(colourspace) Performs given RGB colourspace volume computation using Monte Carlo method and multiprocessing.
RGB_colourspace_volume_coverage_MonteCarlo(…) Returns given RGB colourspace percentage coverage of an arbitrary volume.
Visible Spectrum

colour

is_within_visible_spectrum(XYZ[, interval, …]) Returns if given CIE XYZ tristimulus values are within visible spectrum volume / given colour matching functions volume.

Ancillary Objects

colour.volume

generate_pulse_waves(bins) Generates the pulse waves of given number of bins necessary to totally stimulate the colour matching functions.
XYZ_outer_surface([interval, cmfs, illuminant]) Generates the CIE XYZ colourspace outer surface for given colour matching functions using multi-spectral conversion of pulse waves to CIE XYZ tristimulus values.
Indices and tables

Bibliography

[ANS03]ANSI. Specification of ROMM RGB. 2003. URL: http://www.color.org/ROMMRGB.pdf.
[ARR12]ARRI. ALEXA - Log C Curve - Usage in VFX. 2012. URL: https://drive.google.com/open?id=1t73fAG_QpV7hJxoQPYZDWvOojYkYDgvn.
[Bab12a]BabelColor. ColorChecker RGB and spectra. 2012. URL: http://www.babelcolor.com/download/ColorChecker_RGB_and_spectra.xls.
[Bab12b]BabelColor. The ColorChecker (since 1976!). 2012. URL: http://www.babelcolor.com/main_level/ColorChecker.htm.
[Bar99]Peter G. Barten. Contrast Sensitivity of the Human Eye and Its Effects on Image Quality. Number 1999. SPIE, December 1999. ISBN 9780819478498. URL: http://ebooks.spiedigitallibrary.org/book.aspx?doi=10.1117/3.353254 https://spiedigitallibrary.org/ebooks/PM/Contrast-Sensitivity-of-the-Human-Eye-and-Its-Effects-on/eISBN-9780819478498/10.1117/3.353254, doi:10.1117/3.353254.
[Bar03]Peter G. J. Barten. Formula for the contrast sensitivity of the human eye. In Yoichi Miyake and D. Rene Rasmussen, editors, Proceedings of SPIE, volume 5294, 231–238. December 2003. URL: http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed\&cmd=Retrieve\&dopt=AbstractPlus\&list_uids=15798324032973700240related:kPzpPwHsPtsJ http://proceedings.spiedigitallibrary.org/proceeding.aspx?doi=10.1117/12.135956 http://proceedings.spiedigitallibrary, doi:10.1117/12.537476.
[BS10]S. Bianco and R. Schettini. Two new von Kries based chromatic adaptation transforms found by numerical optimization. Color Research & Application, 35(3):184–192, June 2010. URL: http://doi.wiley.com/10.1002/col.20573, doi:10.1002/col.20573.
[BWDS99]Barry A. Bodhaine, Norman B. Wood, Ellsworth G. Dutton, and James R. Slusser. On Rayleigh Optical Depth Calculations. Journal of Atmospheric and Oceanic Technology, 16(11):1854–1861, November 1999. URL: http://journals.ametsoc.org/doi/abs/10.1175/1520-0426%281999%29016%3C1854%3AORODC%3E2.0.CO%3B2, doi:10.1175/1520-0426(1999)016<1854:ORODC>2.0.CO;2.
[Bor17]Tim Borer. Private Discussion with Mansencal, T. and Shaw, N. 2017.
[Boua]Paul Bourke. Intersection point of two line segments in 2 dimensions. URL: http://paulbourke.net/geometry/pointlineplane/.
[Boub]Paul Bourke. Trilinear Interpolation. URL: http://paulbourke.net/miscellaneous/interpolation/.
[Bre87]Edwin J. Breneman. Corresponding chromaticities for different states of adaptation to complex visual fields. Journal of the Optical Society of America A, 4(6):1115, June 1987. URL: https://www.osapublishing.org/abstract.cfm?URI=josaa-4-6-1115 http://www.opticsinfobase.org/josaa/fulltext.cfm?uri=josaa-4-6-1115\&id=2783, doi:10.1364/JOSAA.4.001115.
[BS08]Michael H. Brill and Sabine Susstrunk. Repairing gamut problems in CIECAM02: A progress report. Color Research & Application, 33(5):424–426, October 2008. URL: http://doi.wiley.com/10.1002/col.20432, doi:10.1002/col.20432.
[Bro09]A. D. Broadbent. Calculation from the Original Experimental Data of the Cie 1931 RGB Standard Observer Spectral Chromaticity Co-Ordinates and Color Matching Functions. 2009. URL: http://www.cis.rit.edu/research/mcsl2/research/broadbent/CIE1931_RGB.pdf http://www.cis.rit.edu/mcsl/research/1931.php.
[BB09]Wilhelm Burger and Mark James Burge. Principles of Digital Image Processing. Undergraduate Topics in Computer Science. Springer London, London, 2009. ISBN 978-1-84800-194-7. URL: http://link.springer.com/10.1007/978-1-84800-195-4, doi:10.1007/978-1-84800-195-4.
[Can14]Canon. EOS C500 Firmware Update. 2014. URL: https://www.usa.canon.com/internet/portal/us/home/explore/product-showcases/cameras-and-lenses/cinema-eos-firmware/c500.
[Can16]Canon. EOS C300 Mark II - EOS C300 Mark II Input Transform Version 2.0 (for Cinema Gamut / BT.2020). 2016. URL: https://www.usa.canon.com/internet/portal/us/home/support/details/cameras/cinema-eos/eos-c300-mark-ii.
[CTS13]Renbo Cao, H Joel Trussell, and Renzo Shamey. Comparison of the performance of inverse transformation methods from OSA-UCS to CIEXYZ. Journal of the Optical Society of America A, 30(8):1508, August 2013. URL: https://www.osapublishing.org/abstract.cfm?URI=josaa-30-8-1508, doi:10.1364/JOSAA.30.001508.
[Cas14]Saullo Castro. Numpy: Fastest way of computing diagonal for each row of a 2d array. 2014. URL: http://stackoverflow.com/questions/26511401/numpy-fastest-way-of-computing-diagonal-for-each-row-of-a-2d-array/26517247#26517247.
[Cen]Paul Centore. The Munsell and Kubelka-Munk Toolbox. URL: http://www.munsellcolourscienceforpainters.com/MunsellAndKubelkaMunkToolbox/MunsellAndKubelkaMunkToolbox.html.
[Cen12]Paul Centore. An open-source inversion algorithm for the Munsell renotation. Color Research & Application, 37(6):455–464, December 2012. URL: http://doi.wiley.com/10.1002/col.20715, doi:10.1002/col.20715.
[Cen14a]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - GeneralRoutines/CIELABtoApproxMunsellSpec.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14b]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/ChromDiagHueAngleToMunsellHue.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14c]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/FindHueOnRenotationOvoid.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14d]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/MaxChromaForExtrapolatedRenotation.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14e]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/MunsellHueToASTMHue.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14f]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/MunsellHueToChromDiagHueAngle.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14g]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/MunsellToxyForIntegerMunsellValue.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14h]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/MunsellToxyY.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14i]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellRenotationRoutines/xyYtoMunsell.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14j]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellSystemRoutines/BoundingRenotationHues.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cen14k]Paul Centore. MunsellAndKubelkaMunkToolboxApr2014 - MunsellSystemRoutines/LinearVsRadialInterpOnRenotationOvoid.m. 2014. URL: https://github.com/colour-science/MunsellAndKubelkaMunkToolbox.
[Cha15]Peter Chamberlain. LUT documentation (to create from another program). 2015. URL: https://forum.blackmagicdesign.com/viewtopic.php?f=21\&t=40284#p232952.
[CWCR04]Vien Cheung, Stephen Westland, David Connah, and Caterina Ripamonti. A comparative study of the characterisation of colour cameras by means of neural networks and polynomial transforms. Coloration Technology, 120(1):19–25, 2004. doi:10.1111/j.1478-4408.2004.tb00201.x.
[CIE]CIE. CIE Spectral Data. URL: http://files.cie.co.at/204.xls.
[CIE04]CIE. CIE 15:2004 Tables Data. 2004. URL: https://law.resource.org/pub/us/cfr/ibr/003/cie.15.2004.tables.xls.
[Cola]Colblindor. Deuteranopia - Red-Green Color Blindness. URL: http://www.color-blindness.com/deuteranopia-red-green-color-blindness/.
[Colb]Colblindor. Protanopia - Red-Green Color Blindness. URL: http://www.color-blindness.com/protanopia-red-green-color-blindness/.
[Colc]Colblindor. Tritanopia - Blue-Yellow Color Blindness. URL: http://www.color-blindness.com/tritanopia-blue-yellow-color-blindness/.
[Cot]Russell Cottrell. The Russell RGB working color space. URL: http://www.russellcottrell.com/photo/downloads/RussellRGB.icc.
[CKM+04]Matthew Cowan, Glenn Kennel, Thomas Maier, Brad Walker, and Matthew Cowan. Constant Sensitivity Experiment to Determine the Bit Depth for Digital Cinema. 2004. URL: http://car.france3.mars.free.fr/Formation INA HD/HDTV/HDTV 2007 v35/SMPTE normes et confs/Contrastm.pdf.
[CVRa]CVRL. CIE (2012) 10-deg XYZ “physiologically-relevant” colour matching functions. URL: http://www.cvrl.org/database/text/cienewxyz/cie2012xyz10.htm.
[CVRb]CVRL. CIE (2012) 2-deg XYZ “physiologically-relevant” colour matching functions. URL: http://www.cvrl.org/database/text/cienewxyz/cie2012xyz2.htm.
[CVRc]CVRL. Luminous efficiency. URL: http://www.cvrl.org/lumindex.htm.
[CVRd]CVRL. New CIE XYZ functions transformed from the CIE (2006) LMS functions. URL: http://cvrl.ioo.ucl.ac.uk/ciexyzpr.htm.
[CVRe]CVRL. Older CIE Standards. URL: http://cvrl.ioo.ucl.ac.uk/cie.htm.
[CVRf]CVRL. Stiles & Burch individual 10-deg colour matching data. URL: http://www.cvrl.org/stilesburch10_ind.htm.
[CVRg]CVRL. Stiles & Burch individual 2-deg colour matching data. URL: http://www.cvrl.org/stilesburch2_ind.htm.
[DFGM15]Maryam Mohammadzadeh Darrodi, Graham Finlayson, Teresa Goodman, and Michal Mackiewicz. Reference data set for camera spectral sensitivity estimation. Journal of the Optical Society of America A, 32(3):381, March 2015. URL: https://www.osapublishing.org/abstract.cfm?URI=josaa-32-3-381, doi:10.1364/JOSAA.32.000381.
[DO10]Wendy Davis and Yoshiro Ohno. Color quality scale. Optical Engineering, 49(3):033602, March 2010. URL: http://opticalengineering.spiedigitallibrary.org/article.aspx?doi=10.1117/1.3360335, doi:10.1117/1.3360335.
[Dji17]Dji. White Paper on D-Log and D-Gamut of DJI Cinema Color System. 2017. URL: https://dl.djicdn.com/downloads/zenmuse+x7/20171010/D-Log_D-Gamut_Whitepaper.pdf.
[Dol16]Dolby. WHAT IS ICTCP? - INTRODUCTION. 2016. URL: https://www.dolby.com/us/en/technologies/dolby-vision/ICtCp-white-paper.pdf.
[Easa]EasyRGB. CMY —> CMYK. URL: http://www.easyrgb.com/index.php?X=MATH\&H=13#text13.
[Easb]EasyRGB. CMY —> RGB. URL: http://www.easyrgb.com/index.php?X=MATH\&H=12#text12.
[Easc]EasyRGB. CMYK —> CMY. URL: http://www.easyrgb.com/index.php?X=MATH\&H=14#text14.
[Easd]EasyRGB. HSL —> RGB. URL: http://www.easyrgb.com/index.php?X=MATH\&H=19#text19.
[Ease]EasyRGB. HSV —> RGB. URL: http://www.easyrgb.com/index.php?X=MATH\&H=21#text21.
[Easf]EasyRGB. RGB —> CMY. URL: http://www.easyrgb.com/index.php?X=MATH\&H=11#text11.
[Easg]EasyRGB. RGB —> HSL. URL: http://www.easyrgb.com/index.php?X=MATH\&H=18#text18.
[Eash]EasyRGB. RGB —> HSV. URL: http://www.easyrgb.com/index.php?X=MATH\&H=20#text20.
[Erda]U. Murat Erdem. Fast Line Segment Intersection. URL: http://www.mathworks.com/matlabcentral/fileexchange/27205-fast-line-segment-intersection.
[Erdb]Turan Erdogan. How to Calculate Luminosity, Dominant Wavelength, and Excitation Purity. URL: http://www.semrock.com/Data/Sites/1/semrockpdfs/whitepaper_howtocalculateluminositywavelengthandpurity.pdf.
[FW98]M. Fairchild and D. Wyble. Colorimetric Characterization of The Apple Studio Display (flat panel LCD). 1998. URL: http://scholarworks.rit.edu/cgi/viewcontent.cgi?article=1922\&context=article.
[FC11]Mark D Fairchild and Ping-hsu Chen. Brightness, lightness, and specifying color in high-dynamic-range scenes and images. In Susan P. Farnand and Frans Gaykema, editors, Proc. SPIE 7867, Image Quality and System Performance VIII, 78670O. January 2011. URL: http://proceedings.spiedigitallibrary.org/proceeding.aspx?doi=10.1117/12.872075, doi:10.1117/12.872075.
[Fai]Mark D. Fairchild. Fairchild YSh. URL: http://rit-mcsl.org/fairchild//files/FairchildYSh.zip.
[Fai91]Mark D. Fairchild. Formulation and testing of an incomplete-chromatic-adaptation model. Color Research & Application, 16(4):243–250, August 1991. URL: http://doi.wiley.com/10.1002/col.5080160406, doi:10.1002/col.5080160406.
[Fai96]Mark D. Fairchild. Refinement of the RLAB color space. Color Research & Application, 21(5):338–346, October 1996. URL: http://doi.wiley.com/10.1002/%28SICI%291520-6378%28199610%2921%3A5%3C338%3A%3AAID-COL3%3E3.0.CO%3B2-Z, doi:10.1002/(SICI)1520-6378(199610)21:5<338::AID-COL3>3.0.CO;2-Z.
[Fai04]Mark D. Fairchild. CIECAM02. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter CIECAM02, pages 289–301. Wiley, 2 edition, 2004.
[Fai13a]Mark D. Fairchild. ATD Model. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 14.2, pages 5852–5991. Wiley, 3 edition, 2013.
[Fai13b]Mark D. Fairchild. Chromatic Adaptation Models. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 11, pages 4179–4252. Wiley, 3 edition, 2013.
[Fai13c]Mark D. Fairchild. FAIRCHILD’S 1990 MODEL. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 11, pages 4418–4495. Wiley, 3 edition, 2013.
[Fai13d]Mark D. Fairchild. IPT Colourspace. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 20.3, pages 6197–6223. Wiley, 3 edition, 2013.
[Fai13e]Mark D. Fairchild. LLAB Model. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 14.3, pages 6025–6178. Wiley, 3 edition, 2013.
[Fai13f]Mark D. Fairchild. The Hunt Model. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 12, pages 5094–5556. Wiley, 3 edition, 2013.
[Fai13g]Mark D. Fairchild. The Nayatani et al. Model. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 11, pages 4810–5085. Wiley, 3 edition, 2013.
[Fai13h]Mark D. Fairchild. The RLAB Model. In Color Appearance Models, The Wiley-IS&T Series in Imaging Science and Technology, chapter 13, pages 5563–5824. Wiley, 3 edition, 2013.
[FW10]Mark D. Fairchild and David R. Wyble. hdr-CIELAB and hdr-IPT: Simple Models for Describing the Color of High-Dynamic-Range and Wide-Color-Gamut Images. In Proc. of Color and Imaging Conference, 322–326. 2010. URL: http://www.ingentaconnect.com/content/ist/cic/2010/00002010/00000001/art00057.
[Fai85]Hugh S. Fairman. The calculation of weight factors for tristimulus integration. Color Research & Application, 10(4):199–203, 1985. URL: http://doi.wiley.com/10.1002/col.5080100407, doi:10.1002/col.5080100407.
[FBH97]Hugh S. Fairman, Michael H. Brill, and Henry Hemmendinger. How the CIE 1931 color-matching functions were derived from Wright-Guild data. Color Research & Application, 22(1):11–23, February 1997. URL: http://doi.wiley.com/10.1002/%28SICI%291520-6378%28199702%2922%3A1%3C11%3A%3AAID-COL4%3E3.0.CO%3B2-7, doi:10.1002/(SICI)1520-6378(199702)22:1<11::AID-COL4>3.0.CO;2-7.
[FMH15]Graham D. Finlayson, Michal MacKiewicz, and Anya Hurlbert. Color Correction Using Root-Polynomial Regression. IEEE Transactions on Image Processing, 24(5):1460–1470, May 2015. URL: http://ieeexplore.ieee.org/document/7047834/, doi:10.1109/TIP.2015.2405336.
[For18]Alex Forsythe. Private Discussion with Mansencal, T. 2018.
[GDY+]Hugo Gaggioni, Patel Dhanendra, Jin Yamashita, N. Kawada, K. Endo, and Curtis Clark. S-Log: A new LUT for digital production mastering and interchange applications. URL: http://pro.sony.com/bbsccms/assets/files/mkt/cinema/solutions/slog_manual.pdf.
[GMRS58]L. G. Glasser, A. H. McKinney, C. D. Reilly, and P. D. Schnelle. Cube-Root Color Coordinate System. Journal of the Optical Society of America, 48(10):736, October 1958. URL: https://www.osapublishing.org/abstract.cfm?URI=josa-48-10-736, doi:10.1364/JOSA.48.000736.
[GDM16]GoPro, Haarm-Pieter Duiker, and Thomas Mansencal. Gopro.py. 2016. URL: https://github.com/hpd/OpenColorIO-Configs/blob/master/aces_1.0.3/python/aces_ocio/colorspaces/gopro.py.
[Gut95]S. Lee Guth. Further applications of the ATD model for color vision. In Eric Walowit, editor, Proc. SPIE 2414, Device-Independent Color Imaging II, volume 2414, 12–26. April 1995. URL: http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=991324, doi:10.1117/12.206546.
[HF98]Radim Halir and Jan Flusser. Numerically Stable Direct Least Squares Fitting Of Ellipses. 1998.
[HernandezAndresLR99]Javier Hernández-Andrés, Raymond L. Lee, and Javier Romero. Calculating correlated color temperatures across the entire gamut of daylight and skylight chromaticities. Applied Optics, 38(27):5703, September 1999. URL: https://www.osapublishing.org/abstract.cfm?URI=ao-38-27-5703, doi:10.1364/AO.38.005703.
[Hol]Joseph Holmes. Ekta Space PS 5. URL: https://www.josephholmes.com/userfiles/Ekta_Space_PS5_JHolmes.zip.
[Hou15]Jim Houston. Private Discussion with Mansencal, T. 2015.
[Hun04]R.W.G. Hunt. The Reproduction of Colour. The Wiley-IS&T Series in Imaging Science and Technology. John Wiley & Sons, Ltd, Chichester, UK, 6 edition, September 2004. ISBN 9780470024270. URL: http://doi.wiley.com/10.1002/0470024275, doi:10.1002/0470024275.
[Hun08a]HunterLab. Hunter L,a,b Color Scale. 2008. URL: http://www.hunterlab.se/wp-content/uploads/2012/11/Hunter-L-a-b.pdf.
[Hun08b]HunterLab. Illuminant Factors in Universal Software and EasyMatch Coatings. 2008. URL: https://support.hunterlab.com/hc/en-us/article_attachments/201437785/an02_02.pdf.
[Hun12]HunterLab. Hunter Rd,a,b Color Scale – History and Application. 2012. URL: https://hunterlabdotcom.files.wordpress.com/2012/07/an-1016-hunter-rd-a-b-color-scale-update-12-07-03.pdf.
[Huta]HutchColor. BestRGB (4 K). URL: http://www.hutchcolor.com/profiles/BestRGB.zip.
[Hutb]HutchColor. DonRGB4 (4 K). URL: http://www.hutchcolor.com/profiles/DonRGB4.zip.
[Hutc]HutchColor. MaxRGB (4 K). URL: http://www.hutchcolor.com/profiles/MaxRGB.zip.
[Hutd]HutchColor. XtremeRGB (4 K). URL: http://www.hutchcolor.com/profiles/XtremeRGB.zip.
[KMH+02]Bongsoon Kang, Ohak Moon, Changhee Hong, Honam Lee, Bonghwan Cho, and Youngsun Kim. Design of advanced color: Temperature control system for HDTV applications. Journal of the Korean Physical Society, 41(6):865–871, 2002. URL: http://cat.inist.fr/?aModele=afficheN\&cpsidt=14448733.
[KPK11]Paul Kienzle, Nikunj Patel, and James Krycka. refl1d.numpyerrors - Refl1D v0.6.19 documentation. 2011. URL: http://www.reflectometry.org/danse/docs/refl1d/_modules/refl1d/numpyerrors.html.
[Kir06]Richard Kirk. Truelight Software Library 2.0. 2006. URL: https://www.filmlight.ltd.uk/pdf/whitepapers/FL-TL-TN-0057-SoftwareLib.pdf.
[Kry85]M Krystek. An algorithm to calculate correlated colour temperature. Color Research & Application, 10(1):38–40, 1985. URL: http://doi.wiley.com/10.1002/col.5080100109, doi:10.1002/col.5080100109.
[Lau12]Laurent. Reproducibility of python pseudo-random numbers across systems and versions? 2012. URL: http://stackoverflow.com/questions/8786084/reproducibility-of-python-pseudo-random-numbers-across-systems-and-versions.
[LLW+17]Changjun Li, Zhiqiang Li, Zhifeng Wang, Yang Xu, Ming Ronnier Luo, Guihua Cui, Manuel Melgosa, Michael H Brill, and Michael Pointer. Comprehensive color solutions: CAM16, CAT16, and CAM16-UCS. Color Research & Application, 42(6):703–718, December 2017. URL: http://doi.wiley.com/10.1002/col.22131, doi:10.1002/col.22131.
[LLRH02]Changjun Li, Ming Ronnier Luo, Bryan Rigg, and Robert W. G. Hunt. CMC 2000 chromatic adaptation transform: CMCCAT2000. Color Research & Application, 27(1):49–58, February 2002. URL: http://doi.wiley.com/10.1002/col.10005, doi:10.1002/col.10005.
[LPLMv07]Changjun Li, Esther Perales, Ming Ronnier Luo, and Francisco Martinez-verdu. The Problem with CAT02 and Its Correction. 2007. URL: https://pdfs.semanticscholar.org/b5a9/0215ad9a1fb6b01f310b3d64305f7c9feb3a.pdf.
[Lin03a]Bruce Lindbloom. Delta E (CIE 1976). 2003. URL: http://brucelindbloom.com/Eqn_DeltaE_CIE76.html.
[Lin03b]Bruce Lindbloom. XYZ to xyY. 2003. URL: http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html.
[Lin09a]Bruce Lindbloom. Chromatic Adaptation. 2009. URL: http://brucelindbloom.com/Eqn_ChromAdapt.html.
[Lin09b]Bruce Lindbloom. Delta E (CIE 2000). 2009. URL: http://brucelindbloom.com/Eqn_DeltaE_CIE2000.html.
[Lin09c]Bruce Lindbloom. Delta E (CMC). 2009. URL: http://brucelindbloom.com/Eqn_DeltaE_CMC.html.
[Lin09d]Bruce Lindbloom. xyY to XYZ. 2009. URL: http://www.brucelindbloom.com/Eqn_xyY_to_XYZ.html.
[Lin11]Bruce Lindbloom. Delta E (CIE 1994). 2011. URL: http://brucelindbloom.com/Eqn_DeltaE_CIE94.html.
[Lin14]Bruce Lindbloom. RGB Working Space Information. 2014. URL: http://www.brucelindbloom.com/WorkingSpaceInfo.html.
[Lin15]Bruce Lindbloom. About the Lab Gamut. 2015. URL: http://www.brucelindbloom.com/LabGamutDisplayHelp.html.
[LPY+16]Taoran Lu, Fangjun Pu, Peng Yin, Tao Chen, Walt Husak, Jaclyn Pytlarz, Robin Atkins, Jan Froehlich, and Guan-Ming Su. ITP Colour Space and Its Compression Performance for High Dynamic Range and Wide Colour Gamut Video Distribution. ZTE Communications, 14(1):32–38, 2016. URL: http://www.cnki.net/kcms/detail/34.1294.TN.20160205.1903.006.html.
[LCL06]M. Ronnier Luo, Guihua Cui, and Changjun Li. Uniform colour spaces based on CIECAM02 colour appearance model. Color Research & Application, 31(4):320–330, August 2006. URL: http://doi.wiley.com/10.1002/col.20227, doi:10.1002/col.20227.
[LL13]Ming Ronnier Luo and Changjun Li. CIECAM02 and Its Recent Developments. In Christine Fernandez-Maloigne, editor, Advanced Color Image Processing and Analysis, pages 19–58. Springer New York, New York, NY, 2013. URL: http://link.springer.com/10.1007/978-1-4419-6190-7, doi:10.1007/978-1-4419-6190-7.
[LLK96]Ming Ronnier Luo, Mei-Chun Lo, and Wen-Guey Kuo. The LLAB (l:c) colour model. Color Research & Application, 21(6):412–429, December 1996. URL: http://doi.wiley.com/10.1002/%28SICI%291520-6378%28199612%2921%3A6%3C412%3A%3AAID-COL4%3E3.0.CO%3B2-Z, doi:10.1002/(SICI)1520-6378(199612)21:6<412::AID-COL4>3.0.CO;2-Z.
[LM96]Ming Ronnier Luo and Ján Morovic. Two Unsolved Issues in Colour Management – Colour Appearance and Gamut Mapping. In Conference: 5th International Conference on High Technology: Imaging Science and Technology – Evolution & Promise, 136–147. 1996. URL: http://www.researchgate.net/publication/236348295_Two_Unsolved_Issues_in_Colour_Management__Colour_Appearance_and_Gamut_Mapping.
[Mac35]David L. MacAdam. Maximum Visual Efficiency of Colored Materials. Journal of the Optical Society of America, 25(11):361–367, November 1935. URL: http://www.opticsinfobase.org/abstract.cfm?URI=josa-25-11-361, doi:10.1364/JOSA.25.000361.
[Mac42]David L. Macadam. Visual Sensitivities to Color Differences in Daylight. Journal of the Optical Society of America, 32(5):28, 1942. doi:10.1364/JOSA.32.000247.
[MOF09]G.M. Machado, M.M. Oliveira, and L. Fernandes. A Physiologically-based Model for Simulation of Color Vision Deficiency. IEEE Transactions on Visualization and Computer Graphics, 15(6):1291–1298, November 2009. URL: http://ieeexplore.ieee.org/document/5290741/, doi:10.1109/TVCG.2009.113.
[Mac10]Gustavo Mello Machado. A model for simulation of color vision deficiency and a color contrast enhancement technique for dichromats. 2010. URL: http://www.lume.ufrgs.br/handle/10183/26950.
[MS03]Henrique Malvar and Gary Sullivan. YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range. 2003. URL: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/Malvar_Sullivan_YCoCg-R_JVT-I014r3-2.pdf.
[Mana]Thomas Mansencal. Lookup. URL: https://github.com/KelSolaar/Foundations/blob/develop/foundations/data_structures.py.
[Manb]Thomas Mansencal. Structure. URL: https://github.com/KelSolaar/Foundations/blob/develop/foundations/data_structures.py.
[Man15]Thomas Mansencal. RED Colourspaces Derivation. 2015. URL: https://www.colour-science.org/posts/red-colourspaces-derivation.
[Man18]Thomas Mansencal. How is the visible gamut bounded? 2018. URL: https://stackoverflow.com/a/48396021/931625.
[Mel13]Manuel Melgosa. CIE / ISO new standard: CIEDE2000. 2013. URL: http://www.color.org/events/colorimetry/Melgosa_CIEDE2000_Workshop-July4.pdf.
[MSHD15]Johannes Meng, Florian Simon, Johannes Hanika, and Carsten Dachsbacher. Physically Meaningful Rendering using Tristimulus Colours. Computer Graphics Forum, 34(4):31–40, July 2015. URL: http://doi.wiley.com/10.1111/cgf.12676, doi:10.1111/cgf.12676.
[Mil14]Scott Miller. A Perceptual EOTF for Extended Dynamic Range Imagery. 2014. URL: https://www.smpte.org/sites/default/files/2014-05-06-EOTF-Miller-1-2-handout.pdf.
[Mor03]Nathan Moroney. A radial sampling of the OSA uniform color scales. Color and Imaging Conference, pages 1–14, 2003. URL: http://www.ingentaconnect.com/content/ist/cic/2003/00002003/00000001/art00031.
[MFH+02]Nathan Moroney, Mark D. Fairchild, Robert W. G. Hunt, Changjun Li, Ming Ronnier Luo, and Todd Newman. The CIECAM02 color appearance model. Color and Imaging Conference, pages 23–27, 2002. URL: http://www.ingentaconnect.com/content/ist/cic/2002/00002002/00000001/art00006.
[Nat16]Graeme Nattress. Private Discussion with Shaw, N. 2016.
[NSY95]Yoshinobu Nayatani, Hiroaki Sobagaki, and Kenjiro Hashimoto Tadashi Yano. Lightness dependency of chroma scales of a nonlinear color-appearance model and its latest formulation. Color Research & Application, 20(3):156–167, June 1995. URL: http://doi.wiley.com/10.1002/col.5080200305, doi:10.1002/col.5080200305.
[NNJ43]Sidney M. Newhall, Dorothy Nickerson, and Deane B. Judd. Final Report of the OSA Subcommittee on the Spacing of the Munsell Colors. Journal of the Optical Society of America, 33(7):385, July 1943. URL: https://www.osapublishing.org/abstract.cfm?URI=josa-33-7-385, doi:10.1364/JOSA.33.000385.
[Ohn05]Yoshi Ohno. Spectral design considerations for white LED color rendering. Optical Engineering, 44(11):111302, 2005. URL: http://opticalengineering.spiedigitallibrary.org/article.aspx?doi=10.1117/1.2130694, doi:10.1117/1.2130694.
[Ohn14]Yoshiro Ohno. Practical Use and Calculation of CCT and Duv. LEUKOS, 10(1):47–55, January 2014. URL: http://www.tandfonline.com/doi/abs/10.1080/15502724.2014.839020, doi:10.1080/15502724.2014.839020.
[OD08]Yoshiro Ohno and Wendy Davis. NIST CQS simulation 7.4. 2008. URL: https://drive.google.com/file/d/1PsuU6QjUJjCX6tQyCud6ul2Tbs8rYWW9/view?usp=sharing.
[Oht97]N. Ohta. The basis of color reproduction engineering. 1997.
[Pan14]Panasonic. VARICAM V-Log/V-Gamut. 2014. URL: http://pro-av.panasonic.net/en/varicam/common/pdf/VARICAM_V-Log_V-Gamut.pdf.
[Poi80]Michael R. Pointer. Pointer’s Gamut Data. 1980. URL: http://www.cis.rit.edu/research/mcsl2/online/PointerData.xls.
[Rei]Kenneth Reitz. CaseInsensitiveDict. URL: https://github.com/kennethreitz/requests/blob/v1.2.3/requests/structures.py#L37.
[Sae]Saeedn. Extend a line segment a specific distance. URL: http://stackoverflow.com/questions/7740507/extend-a-line-segment-a-specific-distance.
[SCKL17]Muhammad Safdar, Guihua Cui, Youn Jin Kim, and Ming Ronnier Luo. Perceptually uniform color space for image signals including high dynamic range and wide gamut. Optics Express, 25(13):15131, June 2017. URL: https://www.osapublishing.org/abstract.cfm?URI=oe-25-13-15131, doi:10.1364/OE.25.015131.
[Sas]Sastanin. How to make scipy.interpolate give an extrapolated result beyond the input range? URL: http://stackoverflow.com/a/2745496/931625.
[SWD05]Gaurav Sharma, Wencheng Wu, and Edul N. Dalal. The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations. Color Research & Application, 30(1):21–30, February 2005. URL: http://doi.wiley.com/10.1002/col.20070, doi:10.1002/col.20070.
[SH15]Peter Shirley and David Hart. The prismatic color space for rgb computations. 2015.
[Sir18]Daniele Siragusano. Private Discussion with Shaw, Nick. 2018.
[Smi78]Alvy Ray Smith. Color gamut transform pairs. In Proceedings of the 5th annual conference on Computer graphics and interactive techniques - SIGGRAPH ‘78, SIGGRAPH ‘78, 12–19. New York, New York, USA, 1978. ACM Press. URL: http://portal.acm.org/citation.cfm?doid=800248.807361, doi:10.1145/800248.807361.
[Smi99]Brian Smits. An RGB-to-Spectrum Conversion for Reflectances. Journal of Graphics Tools, 4(4):11–22, January 1999. URL: http://www.tandfonline.com/doi/abs/10.1080/10867651.1999.10487511, doi:10.1080/10867651.1999.10487511.
[SWG00]K E Spaulding, G J Woolfe, and E J Giorgianni. Reference Input/Output Medium Metric RGB Color Encodings (RIMM/ROMM RGB). 2000. URL: http://www.photo-lovers.org/pdf/color/romm.pdf.
[Spi15]Nick Spiker. Private Discussion with Mansencal, T. 2015. URL: http://www.invisiblelightimages.com/.
[SS88]E. I. Stearns and R. E. Stearns. An example of a method for correcting radiance data for Bandpass error. Color Research & Application, 13(4):257–259, August 1988. URL: http://doi.wiley.com/10.1002/col.5080130410, doi:10.1002/col.5080130410.
[SS00]Andrew Stockman and Lindsay T. Sharpe. Cone Fundamentals. 2000. URL: http://www.cvrl.org/cones.htm.
[SBS99]Sabine Susstrunk, Robert Buckley, and Steve Swen. Standard RGB Color Spaces. 1999.
[SHF00]Sabine E. Susstrunk, Jack M. Holm, and Graham D. Finlayson. Chromatic adaptation performance of different RGB sensors. In Reiner Eschbach and Gabriel G. Marcu, editors, Photonics West 2001 - Electronic Imaging, volume 4300, 172–183. December 2000. URL: http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=903890, doi:10.1117/12.410788.
[Tho12]Larry Thorpe. CANON-LOG TRANSFER CHARACTERISTIC. 2012. URL: http://downloads.canon.com/CDLC/Canon-Log_Transfer_Characteristic_6-20-2012.pdf.
[Tri15]Tashi Trieu. Private Discussion with Mansencal, T. 2015.
[War16]Greg Ward. Private Discussion with Mansencal, T. 2016.
[WEV02]Greg Ward and Elena Eydelberg-Vileshin. Picture Perfect RGB Rendering Using Spectral Prefiltering and Sharp Color Primaries. Eurographics workshop on Rendering, pages 117–124, 2002. URL: http://portal.acm.org/citation.cfm?id=581896.581913%5Cnpapers2://publication/uuid/72F077CB-2366-40E4-901E-5FE35B85BAD6 http://dl.acm.org/citation.cfm?id=581913, doi:10.2312/EGWR/EGWR02/117-124.
[WR04]Stephen Westland and Caterina Ripamonti. Table 8.2. In Computational Colour Science Using MATLAB, pages 137. John Wiley & Sons, Ltd, Chichester, UK, 1 edition, March 2004. URL: http://doi.wiley.com/10.1002/0470020326, doi:10.1002/0470020326.
[WRC12a]Stephen Westland, Caterina Ripamonti, and Vien Cheung. CMCCAT2000. In Computational Colour Science Using MATLAB, chapter 6.2.3, pages 83–86. 2 edition, 2012.
[WRC12b]Stephen Westland, Caterina Ripamonti, and Vien Cheung. CMCCAT97. In Computational Colour Science Using MATLAB, chapter 6.2.2, pages 80. 2 edition, 2012.
[WRC12c]Stephen Westland, Caterina Ripamonti, and Vien Cheung. Correction for Spectral Bandpass. In Computational Colour Science Using MATLAB, chapter 4.4, pages 38. 2 edition, 2012.
[WRC12d]Stephen Westland, Caterina Ripamonti, and Vien Cheung. Extrapolation Methods. In Computational Colour Science Using MATLAB, chapter 4.4, pages 38. 2 edition, 2012.
[WRC12e]Stephen Westland, Caterina Ripamonti, and Vien Cheung. Interpolation Methods. In Computational Colour Science Using MATLAB, chapter 4.3, pages 29–37. 2 edition, 2012.
[Wik]Wikipedia. Ellipse. URL: https://en.wikipedia.org/wiki/Ellipse.
[Wik01a]Wikipedia. Approximation. 2001. URL: http://en.wikipedia.org/wiki/Color_temperature#Approximation.
[Wik01b]Wikipedia. Color temperature. 2001. URL: http://en.wikipedia.org/wiki/Color_temperature.
[Wik01c]Wikipedia. Luminance. 2001. URL: https://en.wikipedia.org/wiki/Luminance.
[Wik01d]Wikipedia. Rayleigh scattering. 2001. URL: http://en.wikipedia.org/wiki/Rayleigh_scattering.
[Wik03a]Wikipedia. HSL and HSV. 2003. URL: http://en.wikipedia.org/wiki/HSL_and_HSV.
[Wik03b]Wikipedia. Lagrange polynomial - Definition. 2003. URL: https://en.wikipedia.org/wiki/Lagrange_polynomial#Definition.
[Wik03c]Wikipedia. Luminosity function. 2003. URL: https://en.wikipedia.org/wiki/Luminosity_function#Details.
[Wik03d]Wikipedia. Mean squared error. 2003. URL: https://en.wikipedia.org/wiki/Mean_squared_error.
[Wik03e]Wikipedia. Michaelis–Menten kinetics. 2003. URL: https://en.wikipedia.org/wiki/Michaelis–Menten_kinetics.
[Wik03f]Wikipedia. Vandermonde matrix. 2003. URL: https://en.wikipedia.org/wiki/Vandermonde_matrix.
[Wik04a]Wikipedia. Peak signal-to-noise ratio. 2004. URL: https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio.
[Wik04b]Wikipedia. Surfaces. 2004. URL: http://en.wikipedia.org/wiki/Gamut#Surfaces.
[Wik04c]Wikipedia. Whiteness. 2004. URL: http://en.wikipedia.org/wiki/Whiteness.
[Wik04d]Wikipedia. Wide-gamut RGB color space. 2004. URL: http://en.wikipedia.org/wiki/Wide-gamut_RGB_color_space.
[Wik04e]Wikipedia. YCbCr. 2004. URL: https://en.wikipedia.org/wiki/YCbCr.
[Wik05a]Wikipedia. CIE 1931 color space. 2005. URL: http://en.wikipedia.org/wiki/CIE_1931_color_space.
[Wik05b]Wikipedia. ISO 31-11. 2005. URL: https://en.wikipedia.org/wiki/ISO_31-11.
[Wik05c]Wikipedia. Lanczos resampling. 2005. URL: https://en.wikipedia.org/wiki/Lanczos_resampling.
[Wik05d]Wikipedia. Luminous Efficacy. 2005. URL: https://en.wikipedia.org/wiki/Luminous_efficacy.
[Wik05e]Wikipedia. Mesopic weighting function. 2005. URL: http://en.wikipedia.org/wiki/Mesopic_vision#Mesopic_weighting_function.
[Wik06a]Wikipedia. List of common coordinate transformations. 2006. URL: http://en.wikipedia.org/wiki/List_of_common_coordinate_transformations.
[Wik06b]Wikipedia. White points of standard illuminants. 2006. URL: http://en.wikipedia.org/wiki/Standard_illuminant#White_points_of_standard_illuminants.
[Wik07a]Wikipedia. CAT02. 2007. URL: http://en.wikipedia.org/wiki/CIECAM02#CAT02.
[Wik07b]Wikipedia. CIECAM02. 2007. URL: http://en.wikipedia.org/wiki/CIECAM02.
[Wik07c]Wikipedia. CIELUV. 2007. URL: http://en.wikipedia.org/wiki/CIELUV.
[Wik07d]Wikipedia. Lightness. 2007. URL: http://en.wikipedia.org/wiki/Lightness.
[Wik07e]Wikipedia. The reverse transformation. 2007. URL: http://en.wikipedia.org/wiki/CIELUV#The_reverse_transformation.
[Wik08a]Wikipedia. CIE 1960 color space. 2008. URL: http://en.wikipedia.org/wiki/CIE_1960_color_space.
[Wik08b]Wikipedia. CIE 1964 color space. 2008. URL: http://en.wikipedia.org/wiki/CIE_1964_color_space.
[Wik08c]Wikipedia. Color difference. 2008. URL: http://en.wikipedia.org/wiki/Color_difference.
[Wik08d]Wikipedia. Relation to CIE XYZ. 2008. URL: http://en.wikipedia.org/wiki/CIE_1960_color_space#Relation_to_CIE_XYZ.
[Wys63]Günter Wyszecki. Proposal for a New Color-Difference Formula. Journal of the Optical Society of America, 53(11):1318, November 1963. URL: https://www.osapublishing.org/abstract.cfm?URI=josa-53-11-1318, doi:10.1364/JOSA.53.001318.
[WS00a]Günther Wyszecki and W S Stiles. Equation I(1.2.1). In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 8. Wiley, 2000.
[WS00b]Günther Wyszecki and W S Stiles. Table 2(5.4.1) MacAdam Ellipses (Observer PGN) Observed and Calculated on the Basis of a Normal Distribution of Color Matches about a Color Center (Silberstein and MacAdam, 1945). In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 309. Wiley, 2000.
[WS00c]Günther Wyszecki and W. S. Stiles. CIE 1976 (L*u*v*)-Space and Color-Difference Formula. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 167. Wiley, 2000.
[WS00d]Günther Wyszecki and W. S. Stiles. CIE Method of Calculating D-Illuminants. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 145–146. Wiley, 2000.
[WS00e]Günther Wyszecki and W. S. Stiles. DISTRIBUTION TEMPERATURE, COLOR TEMPERATURE, AND CORRELATED COLOR TEMPERATURE. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 224–229. Wiley, 2000.
[WS00f]Günther Wyszecki and W. S. Stiles. Integration Replaced by Summation. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 158–163. Wiley, 2000.
[WS00g]Günther Wyszecki and W. S. Stiles. Standard Photometric Observers. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 256–259,395. Wiley, 2000.
[WS00h]Günther Wyszecki and W. S. Stiles. Table 1(3.11) Isotemperature Lines. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 228. Wiley, 2000.
[WS00i]Günther Wyszecki and W. S. Stiles. Table 1(3.3.3). In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 138–139. Wiley, 2000.
[WS00j]Günther Wyszecki and W. S. Stiles. Table I(3.7). In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 776–777. Wiley, 2000.
[WS00k]Günther Wyszecki and W. S. Stiles. Table I(6.5.3) Whiteness Formulae (Whiteness Measure Denoted by W). In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 837–839. Wiley, 2000.
[WS00l]Günther Wyszecki and W. S. Stiles. Table II(3.7). In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 778–779. Wiley, 2000.
[WS00m]Günther Wyszecki and W. S. Stiles. The CIE 1964 Standard Observer. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 141. Wiley, 2000.
[XR15]X-Rite. New color specifications for ColorChecker SG and Classic Charts. 2015. URL: http://xritephoto.com/ph_product_overview.aspx?ID=938\&Action=Support\&SupportID=5884#.
[XRP12]X-Rite and Pantone. Color iQC and Color iMatch Color Calculations Guide. 2012. URL: https://www.xrite.com/-/media/xrite/files/apps_engineering_techdocuments/c/09_color_calculations_en.pdf.
[Yor14]Rory Yorke. Python: Change format of np.array or allow tolerance in in1d function. 2014. URL: http://stackoverflow.com/a/23521245/931625.
[AdobeSystems05]Adobe Systems. Adobe RGB (1998) Color Image Encoding. 2005. URL: http://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf.
[AdobeSystems13a]Adobe Systems. Adobe DNG Software Development Kit (SDK) - 1.3.0.0 - dng_sdk_1_3/dng_sdk/source/dng_temperature.cpp::dng_temperature::Set_xy_coord. 2013. URL: https://www.adobe.com/support/downloads/dng/dng_sdk.html.
[AdobeSystems13b]Adobe Systems. Adobe DNG Software Development Kit (SDK) - 1.3.0.0 - dng_sdk_1_3/dng_sdk/source/dng_temperature.cpp::dng_temperature::xy_coord. 2013. URL: https://www.adobe.com/support/downloads/dng/dng_sdk.html.
[AdobeSystems13c]Adobe Systems. Cube LUT Specification. 2013. URL: https://drive.google.com/open?id=143Eh08ZYncCAMwJ1q4gWxVOqR_OSWYvs.
[AssociationoRIaBusinesses15]Association of Radio Industries and Businesses. Essential Parameter Values for the Extended Image Dynamic Range Television (EIDRTV) System for Programme Production. 2015. URL: https://www.arib.or.jp/english/std_tr/broadcasting/desc/std-b67.html.
[ASTMInternational89]ASTM International. ASTM D1535-89 - Standard Practice for Specifying Color by the Munsell System. 1989. URL: http://www.astm.org/DATABASE.CART/HISTORICAL/D1535-89.htm.
[ASTMInternational07]ASTM International. ASTM D2244-07 - Standard Practice for Calculation of Color Tolerances and Color Differences from Instrumentally Measured Color Coordinates. 2007.
[ASTMInternational08]ASTM International. ASTM D1535-08e1 - Standard Practice for Specifying Color by the Munsell System. 2008. doi:10.1520/D1535-08E01.
[ASTMInternational11]ASTM International. ASTM E2022-11 - Standard Practice for Calculation of Weighting Factors for Tristimulus Integration. 2011. doi:10.1520/E2022-11.
[ASTMInternational15]ASTM International. ASTM E308-15 - Standard Practice for Computing the Colors of Objects by Using the CIE System. 2015. doi:10.1520/E0308-15.
[CIET13294]CIE TC 1-32. CIE 109-1994 A Method of Predicting Corresponding Colours under Different Chromatic and Illuminance Adaptations. 1994. URL: http://div1.cie.co.at/?i_ca_id=551\&pubid=34.
[CIET13606]CIE TC 1-36. CIE 170-1:2006 Fundamental Chromaticity Diagram with Physiological Axes - Part 1. 2006. URL: http://div1.cie.co.at/?i_ca_id=551\&pubid=48.
[CIET13805a]CIE TC 1-38. 9. INTERPOLATION. In CIE 167:2005 Recommended Practice for Tabulating Spectral Data for Use in Colour Computations, chapter 9, pages 14–19. 2005. URL: http://div1.cie.co.at/?i_ca_id=551\&pubid=47.
[CIET13805b]CIE TC 1-38. 9.2.4 Method of interpolation for uniformly spaced independent variable. In CIE 167:2005 Recommended Practice for Tabulating Spectral Data for Use in Colour Computations, chapter 9.2.4, pages 1–27. 2005. URL: http://div1.cie.co.at/?i_ca_id=551\&pubid=47.
[CIET13805c]CIE TC 1-38. EXTRAPOLATION. In CIE 167:2005 Recommended Practice for Tabulating Spectral Data for Use in Colour Computations, chapter 10, pages 19–20. 2005. URL: http://div1.cie.co.at/?i_ca_id=551\&pubid=47.
[CIET13805d]CIE TC 1-38. Table V. Values of the c-coefficients of Equ.s 6 and 7. In CIE 167:2005 Recommended Practice for Tabulating Spectral Data for Use in Colour Computations, chapter Table V, pages 19. 2005. URL: http://div1.cie.co.at/?i_ca_id=551\&pubid=47.
[CIET14804a]CIE TC 1-48. 3.1 Recommendations concerning standard physical data of illuminants. In CIE 015:2004 Colorimetry, 3rd Edition, chapter 3.1, pages 12–13. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804b]CIE TC 1-48. 9.1 Dominant wavelength and purity. In CIE 015:2004 Colorimetry, 3rd Edition, chapter 9.1, pages 32–33. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804c]CIE TC 1-48. APPENDIX E. INFORMATION ON THE USE OF PLANCK’S EQUATION FOR STANDARD AIR. In CIE 015:2004 Colorimetry, 3rd Edition, chapter APPENDIX E, pages 77–82. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804d]CIE TC 1-48. CIE 015:2004 Colorimetry, 3rd Edition. Commission internationale de l’éclairage, 2004. ISBN 978-3-901-90633-6. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804e]CIE TC 1-48. CIE 1976 uniform chromaticity scale diagram (UCS diagram). In CIE 015:2004 Colorimetry, 3rd Edition, chapter 8.1, pages 24. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804f]CIE TC 1-48. CIE 1976 uniform colour spaces. In CIE 015:2004 Colorimetry, 3rd Edition, chapter 8.2, pages 24. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804g]CIE TC 1-48. EXPLANATORY COMMENTS - 5. In CIE 015:2004 Colorimetry, 3rd Edition, pages 68–68. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804h]CIE TC 1-48. Extrapolation. In CIE 015:2004 Colorimetry, 3rd Edition, chapter 7.2.2.1, pages 24. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[CIET14804i]CIE TC 1-48. The evaluation of whiteness. In CIE 015:2004 Colorimetry, 3rd Edition, chapter 9.4, pages 24. 2004. URL: http://www.cie.co.at/publications/colorimetry-3rd-edition.
[DigitalCInitiatives07]Digital Cinema Initiatives. Digital Cinema System Specification - Version 1.1. 2007. URL: http://www.dcimovies.com/archives/spec_v1_1/DCI_DCinema_System_Spec_v1_1.pdf.
[EuropeanCInitiative02]European Color Initiative. ECI RGB v2. 2002. URL: http://www.eci.org/_media/downloads/icc_profiles_from_eci/ecirgbv20.zip.
[FiLMiCInc17]FiLMiC Inc. FiLMiC Pro - User Manual v6 - Revision 1. 2017. URL: http://www.filmicpro.com/FilmicProUserManualv6.pdf.
[HewlettPDCompany09]Hewlett-Packard Development Company. Understanding the HP DreamColor LP2480zx DCI-P3 Emulation Color Space. 2009. URL: http://www.hp.com/united-states/campaigns/workstations/pdfs/lp2480zx-dci–p3-emulation.pdf.
[IESCCommitteeTM2714WGroup14]IES Computer Committee and TM-27-14 Working Group. IES Standard Format for the Electronic Transfer of Spectral Data Electronic Transfer of Spectral Data. 2014.
[InternationalECommission99]International Electrotechnical Commission. IEC 61966-2-1:1999 - Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB. 1999. URL: https://webstore.iec.ch/publication/6169.
[InternationalTUnion98]International Telecommunication Union. Recommendation ITU-R BT.470-6 - CONVENTIONAL TELEVISION SYSTEMS. 1998. URL: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.470-6-199811-S!!PDF-E.pdf.
[InternationalTUnion11a]International Telecommunication Union. Recommendation ITU-R BT.1886 - Reference electro-optical transfer function for flat panel displays used in HDTV studio production BT Series Broadcasting service. 2011. URL: https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.1886-0-201103-I!!PDF-E.pdf.
[InternationalTUnion11b]International Telecommunication Union. Recommendation ITU-R BT.601-7 - Studio encoding parameters of digital television for standard 4:3 and wide-screen 16:9 aspect ratios. 2011. URL: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf.
[InternationalTUnion11c]International Telecommunication Union. Recommendation ITU-T T.871 - Information technology – Digital compression and coding of continuous-tone still images: JPEG File Interchange Format (JFIF). 2011. URL: https://www.itu.int/rec/dologin_pub.asp?lang=e\&id=T-REC-T.871-201105-I!!PDF-E\&type=items.
[InternationalTUnion15a]International Telecommunication Union. Recommendation ITU-R BT.2020 - Parameter values for ultra-high definition television systems for production and international programme exchange. 2015. URL: https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-2-201510-I!!PDF-E.pdf.
[InternationalTUnion15b]International Telecommunication Union. Recommendation ITU-R BT.709-6 - Parameter values for the HDTV standards for production and international programme exchange BT Series Broadcasting service. 2015. URL: https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-6-201506-I!!PDF-E.pdf.
[InternationalTUnion15c]International Telecommunication Union. Report ITU-R BT.2246-4 - The present state of ultra-high definition television BT Series Broadcasting service. 2015.
[InternationalTUnion16]International Telecommunication Union. Recommendation ITU-R BT.2100-1 - Image parameter values for high dynamic range television for use in production and international programme exchange. 2016. URL: https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2100-1-201706-I!!PDF-E.pdf.
[MunsellCSciencea]Munsell Color Science. Macbeth Colorchecker. URL: http://www.rit-mcsl.org/UsefulData/MacbethColorChecker.xls.
[MunsellCScienceb]Munsell Color Science. Munsell Colours Data. URL: http://www.cis.rit.edu/research/mcsl2/online/munsell.php.
[NationalEMAssociation04]National Electrical Manufacturers Association. Digital Imaging and Communications in Medicine (DICOM) Part 14: Grayscale Standard Display Function. 2004. URL: http://medical.nema.org/dicom/2004/04_14PU.PDF.
[RenewableRDCenter03]Renewable Resource Data Center. Reference Solar Spectral Irradiance: ASTM G-173. 2003. URL: http://rredc.nrel.gov/solar/spectra/am1.5/ASTMG173/ASTMG173.html.
[RisingSResearch]Rising Sun Research. cineSpace LUT Library. URL: https://sourceforge.net/projects/cinespacelutlib/.
[SocietyoMPaTEngineers93]Society of Motion Picture and Television Engineers. RP 177:1993 : Derivation of Basic Television Color Equations. Volume RP 177:199. The Society of Motion Picture and Television Engineers, January 1993. ISBN 978-1-61482-191-5. URL: http://standards.smpte.org/lookup/doi/10.5594/S9781614821915, doi:10.5594/S9781614821915.
[SocietyoMPaTEngineers99]Society of Motion Picture and Television Engineers. ANSI/SMPTE 240M-1995 - Signal Parameters - 1125-Line High-Definition Production Systems. 1999. URL: http://car.france3.mars.free.fr/HD/INA- 26 jan 06/SMPTE normes et confs/s240m.pdf.
[SocietyoMPaTEngineers04]Society of Motion Picture and Television Engineers. RP 145:2004: SMPTE C Color Monitor Colorimetry. Volume RP 145:200. The Society of Motion Picture and Television Engineers, January 2004. ISBN 978-1-61482-164-9. URL: http://standards.smpte.org/lookup/doi/10.5594/S9781614821649, doi:10.5594/S9781614821649.
[SocietyoMPaTEngineers14]Society of Motion Picture and Television Engineers. SMPTE ST 2084:2014 - Dynamic Range Electro-Optical Transfer Function of Mastering Reference Displays. 2014. URL: http://www.techstreet.com/products/1883436, doi:10.5594/SMPTE.ST2084.2014.
[SonyCorporationa]Sony Corporation. S-Gamut3_S-Gamut3Cine_Matrix.xlsx. URL: https://community.sony.com/sony/attachments/sony/large-sensor-camera-F5-F55/12359/3/S-Gamut3_S-Gamut3Cine_Matrix.xlsx.
[SonyCorporationb]Sony Corporation. S-Log Whitepaper. URL: http://www.theodoropoulos.info/attachments/076_on S-Log.pdf.
[SonyCorporationc]Sony Corporation. Technical Summary for S-Gamut3.Cine/S-Log3 and S-Gamut3/S-Log3. URL: http://community.sony.com/sony/attachments/sony/large-sensor-camera-F5-F55/12359/2/TechnicalSummary_for_S-Gamut3Cine_S-Gamut3_S-Log3_V1_00.pdf.
[SonyCorporation12]Sony Corporation. S-Log2 Technical Paper. 2012. URL: https://pro.sony.com/bbsccms/assets/files/micro/dmpc/training/S-Log2_Technical_PaperV1_0.pdf.
[SonyImageworks12]Sony Imageworks. Make.py. 2012. URL: https://github.com/imageworks/OpenColorIO-Configs/blob/master/nuke-default/make.py.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommittee]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project Subcommittee. Academy Color Encoding System. URL: http://www.oscars.org/science-technology/council/projects/aces.html.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommittee14a]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project Subcommittee. Specification S-2013-001 - ACESproxy, an Integer Log Encoding of ACES Image Data. 2014. URL: https://github.com/ampas/aces-dev/tree/master/documents.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommittee14b]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project Subcommittee. Specification S-2014-003 - ACEScc, A Logarithmic Encoding of ACES Data for use within Color Grading Systems. 2014. URL: https://github.com/ampas/aces-dev/tree/master/documents.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommittee14c]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project Subcommittee. Technical Bulletin TB-2014-004 - Informative Notes on SMPTE ST 2065-1 – Academy Color Encoding Specification (ACES). 2014. URL: https://github.com/ampas/aces-dev/tree/master/documents.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommittee14d]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project Subcommittee. Technical Bulletin TB-2014-012 - Academy Color Encoding System Version 1.0 Component Names. 2014. URL: https://github.com/ampas/aces-dev/tree/master/documents.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESPSubcommittee15]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project Subcommittee. Specification S-2014-004 - ACEScg – A Working Space for CGI Render and Compositing. 2015. URL: https://github.com/ampas/aces-dev/tree/master/documents.
[TheAoMPAaSciencesScienceaTCouncilAcademyCESACESProject16]The Academy of Motion Picture Arts and Sciences, Science and Technology Council, and Academy Color Encoding System (ACES) Project. Specification S-2016-001 - ACEScct, A Quasi-Logarithmic Encoding of ACES Data for use within Color Grading Systems. 2016. URL: https://github.com/ampas/aces-dev/tree/v1.0.3/documents.

Examples

Most of the objects are available from the colour namespace:

>>> import colour

Chromatic Adaptation

>>> XYZ = [0.20654008, 0.12197225, 0.05136952]
>>> D65 = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65']
>>> A = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['A']
>>> colour.chromatic_adaptation(
...     XYZ, colour.xy_to_XYZ(D65), colour.xy_to_XYZ(A))
array([ 0.2533053 ,  0.13765138,  0.01543307])
>>> sorted(colour.CHROMATIC_ADAPTATION_METHODS.keys())
['CIE 1994', 'CMCCAT2000', 'Fairchild 1990', 'Von Kries']

Algebra

Kernel Interpolation
>>> y = [5.9200, 9.3700, 10.8135, 4.5100, 69.5900, 27.8007, 86.0500]
>>> x = range(len(y))
>>> colour.KernelInterpolator(x, y)([0.25, 0.75, 5.50])
array([  6.18062083,   8.08238488,  57.85783403])
Sprague (1880) Interpolation
>>> y = [5.9200, 9.3700, 10.8135, 4.5100, 69.5900, 27.8007, 86.0500]
>>> x = range(len(y))
>>> colour.SpragueInterpolator(x, y)([0.25, 0.75, 5.50])
array([  6.72951612,   7.81406251,  43.77379185])

Spectral Computations

>>> colour.sd_to_XYZ(colour.LIGHT_SOURCES_SDS['Neodimium Incandescent'])
array([ 36.94726204,  32.62076174,  13.0143849 ])
>>> sorted(colour.SPECTRAL_TO_XYZ_METHODS.keys())
['ASTM E308-15', 'Integration', 'astm2015']

Multi-Spectral Computations

>>> msd = np.array([
...     [[0.01367208, 0.09127947, 0.01524376, 0.02810712, 0.19176012, 0.04299992],
...      [0.00959792, 0.25822842, 0.41388571, 0.22275120, 0.00407416, 0.37439537],
...      [0.01791409, 0.29707789, 0.56295109, 0.23752193, 0.00236515, 0.58190280]],
...     [[0.01492332, 0.10421912, 0.02240025, 0.03735409, 0.57663846, 0.32416266],
...      [0.04180972, 0.26402685, 0.03572137, 0.00413520, 0.41808194, 0.24696727],
...      [0.00628672, 0.11454948, 0.02198825, 0.39906919, 0.63640803, 0.01139849]],
...     [[0.04325933, 0.26825359, 0.23732357, 0.05175860, 0.01181048, 0.08233768],
...      [0.02484169, 0.12027161, 0.00541695, 0.00654612, 0.18603799, 0.36247808],
...      [0.03102159, 0.16815442, 0.37186235, 0.08610666, 0.00413520, 0.78492409]],
...     [[0.11682307, 0.78883040, 0.74468607, 0.83375293, 0.90571451, 0.70054168],
...      [0.06321812, 0.41898224, 0.15190357, 0.24591440, 0.55301750, 0.00657664],
...      [0.00305180, 0.11288624, 0.11357290, 0.12924391, 0.00195315, 0.21771573]],
... ])
>>> colour.multi_sds_to_XYZ(msd, colour.SpectralShape(400, 700, 60),
...                              cmfs, illuminant))
[[[  9.73192501   5.02105851   3.22790699]
  [ 16.08032168  24.47303359  10.28681006]
  [ 17.73513774  29.61865582  12.10713449]]
 [[ 25.69298792  11.72611193   3.70187275]
  [ 18.51208526   8.03720984   9.30361825]
  [ 48.55945054  32.30885571   4.09223401]]
 [[  5.7743232   10.10692925  10.08461311]
  [  8.81306527   3.65394599   4.20783881]
  [  8.06007398  15.87077693   7.02551086]]
 [[ 90.88877129  81.82966846  29.86765971]
  [ 38.64801062  26.70860262  15.08396538]
  [  8.77151115  10.56330761   4.28940206]]]
>>> sorted(colour.MULTI_SPECTRAL_TO_XYZ_METHODS.keys())
['Integration']

Blackbody Spectral Radiance Computation

>>> colour.sd_blackbody(5000)
SpectralDistribution([[  3.60000000e+02,   6.65427827e+12],
                      [  3.61000000e+02,   6.70960528e+12],
                      [  3.62000000e+02,   6.76482512e+12],
                      ...
                      [  7.78000000e+02,   1.06068004e+13],
                      [  7.79000000e+02,   1.05903327e+13],
                      [  7.80000000e+02,   1.05738520e+13]],
                     interpolator=SpragueInterpolator,
                     interpolator_args={},
                     extrapolator=Extrapolator,
                     extrapolator_args={'right': None, 'method': 'Constant', 'left': None})

Dominant, Complementary Wavelength & Colour Purity Computation

>>> xy = [0.54369557, 0.32107944]
>>> xy_n = [0.31270000, 0.32900000]
>>> colour.dominant_wavelength(xy, xy_n)
(array(616.0),
 array([ 0.68354746,  0.31628409]),
 array([ 0.68354746,  0.31628409]))

Lightness Computation

>>> colour.lightness(12.19722535)
41.527875844653451
>>> sorted(colour.LIGHTNESS_METHODS.keys())
['CIE 1976',
 'Fairchild 2010',
 'Fairchild 2011',
 'Glasser 1958',
 'Lstar1976',
 'Wyszecki 1963']

Luminance Computation

>>> colour.luminance(41.52787585)
12.197225353400775
>>> sorted(colour.LUMINANCE_METHODS.keys())
['ASTM D1535-08',
 'CIE 1976',
 'Fairchild 2010',
 'Fairchild 2011',
 'Newhall 1943',
 'astm2008',
 'cie1976']

Whiteness Computation

>>> colour.whiteness(xy=[0.3167, 0.3334], Y=100, xy_n=[0.3139, 0.3311])
array([ 93.85 ,  -1.305])
>>> sorted(colour.WHITENESS_METHODS.keys())
['ASTM E313',
 'Berger 1959',
 'CIE 2004',
 'Ganz 1979',
 'Stensby 1968',
 'Taube 1960',
 'cie2004']

Yellowness Computation

>>> XYZ = [95.00000000, 100.00000000, 105.00000000]
>>> colour.yellowness(XYZ)
11.065000000000003
>>> sorted(colour.YELLOWNESS_METHODS.keys())
['ASTM D1925', 'ASTM E313']

Luminous Flux, Efficiency & Efficacy Computation

Luminous Flux
>>> sd = colour.LIGHT_SOURCES_SDS['Neodimium Incandescent']
>>> colour.luminous_flux(sd)
23807.655527367202
Luminous Efficiency
>>> sd = colour.LIGHT_SOURCES_SDS['Neodimium Incandescent']
>>> colour.luminous_efficiency(sd)
0.19943935624521045
Luminous Efficacy
>>> sd = colour.LIGHT_SOURCES_SDS['Neodimium Incandescent']
>>> colour.luminous_efficacy(sd)
136.21708031547874

Colour Models

CIE xyY Colourspace
>>> colour.XYZ_to_xyY([0.20654008, 0.12197225, 0.05136952])
array([ 0.54369557,  0.32107944,  0.12197225])
CIE L*a*b* Colourspace
>>> colour.XYZ_to_Lab([0.20654008, 0.12197225, 0.05136952])
array([ 41.52787529,  52.63858304,  26.92317922])
CIE L*u*v* Colourspace
>>> colour.XYZ_to_Luv([0.20654008, 0.12197225, 0.05136952])
array([ 41.52787529,  96.83626054,  17.75210149])
CIE 1960 UCS Colourspace
>>> colour.XYZ_to_UCS([0.20654008, 0.12197225, 0.05136952])
array([ 0.13769339,  0.12197225,  0.1053731 ])
CIE 1964 U*V*W* Colourspace
>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> colour.XYZ_to_UVW(XYZ)
array([ 94.55035725,  11.55536523,  40.54757405])
Hunter L,a,b Colour Scale
>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> colour.XYZ_to_Hunter_Lab(XYZ)
array([ 34.92452577,  47.06189858,  14.38615107])
Hunter Rd,a,b Colour Scale
>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> colour.XYZ_to_Hunter_Rdab(XYZ)
array([ 12.197225  ,  57.12537874,  17.46241341])
CAM02-LCD, CAM02-SCD, and CAM02-UCS Colourspaces - Luo, Cui and Li (2006)
>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> XYZ_w = [95.05, 100.00, 108.88]
>>> L_A = 318.31
>>> Y_b = 20.0
>>> surround = colour.CIECAM02_VIEWING_CONDITIONS['Average']
>>> specification = colour.XYZ_to_CIECAM02(
        XYZ, XYZ_w, L_A, Y_b, surround)
>>> JMh = (specification.J, specification.M, specification.h)
>>> colour.JMh_CIECAM02_to_CAM02UCS(JMh)
array([ 47.16899898,  38.72623785,  15.8663383 ])
CAM16-LCD, CAM16-SCD, and CAM16-UCS Colourspaces - Li et al. (2017)
>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> XYZ_w = [95.05, 100.00, 108.88]
>>> L_A = 318.31
>>> Y_b = 20.0
>>> surround = colour.CAM16_VIEWING_CONDITIONS['Average']
>>> specification = colour.XYZ_to_CAM16(
        XYZ, XYZ_w, L_A, Y_b, surround)
>>> JMh = (specification.J, specification.M, specification.h)
>>> colour.JMh_CAM16_to_CAM16UCS(JMh)
array([ 46.55542238,  40.22460974,  14.25288392]
IPT Colourspace
>>> colour.XYZ_to_IPT([0.20654008, 0.12197225, 0.05136952])
array([ 0.38426191,  0.38487306,  0.18886838])
DIN99 Colourspace
>>> Lab = [41.52787529, 52.63858304, 26.92317922]
>>> colour.Lab_to_DIN99(Lab)
array([ 53.22821988,  28.41634656,   3.89839552])
hdr-CIELAB Colourspace
>>> colour.XYZ_to_hdr_CIELab([0.20654008, 0.12197225, 0.05136952])
array([ 51.87002062,  60.4763385 ,  32.14551912])
hdr-IPT Colourspace
>>> colour.XYZ_to_hdr_IPT([0.20654008, 0.12197225, 0.05136952])
array([ 25.18261761, -22.62111297,   3.18511729])
OSA UCS Colourspace
>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> colour.XYZ_to_OSA_UCS(XYZ)
array([-3.0049979 ,  2.99713697, -9.66784231])
JzAzBz Colourspace
>>> colour.XYZ_to_JzAzBz([0.20654008, 0.12197225, 0.05136952])
array([ 0.00535048,  0.00924302,  0.00526007])
RGB Colourspace and Transformations
>>> XYZ = [0.21638819, 0.12570000, 0.03847493]
>>> illuminant_XYZ = [0.34570, 0.35850]
>>> illuminant_RGB = [0.31270, 0.32900]
>>> chromatic_adaptation_transform = 'Bradford'
>>> XYZ_to_RGB_matrix = [
         [3.24062548, -1.53720797, -0.49862860],
         [-0.96893071, 1.87575606, 0.04151752],
         [0.05571012, -0.20402105, 1.05699594]]
>>> colour.XYZ_to_RGB(
         XYZ,
         illuminant_XYZ,
         illuminant_RGB,
         XYZ_to_RGB_matrix,
         chromatic_adaptation_transform)
array([ 0.45595571,  0.03039702,  0.04087245])
RGB Colourspace Derivation
>>> p = [0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700]
>>> w = [0.32168, 0.33767]
>>> colour.normalised_primary_matrix(p, w)
array([[  9.52552396e-01,   0.00000000e+00,   9.36786317e-05],
       [  3.43966450e-01,   7.28166097e-01,  -7.21325464e-02],
       [  0.00000000e+00,   0.00000000e+00,   1.00882518e+00]])
Y’CbCr Colour Encoding
>>> colour.RGB_to_YCbCr([1.0, 1.0, 1.0])
array([ 0.92156863,  0.50196078,  0.50196078])
YCoCg Colour Encoding
>>> colour.RGB_to_YCoCg([0.75, 0.75, 0.0])
array([ 0.5625,  0.375 ,  0.1875])
ICTCP Colour Encoding
>>> colour.RGB_to_ICTCP([0.45620519, 0.03081071, 0.04091952])
array([ 0.07351364,  0.00475253,  0.09351596])
HSV Colourspace
>>> colour.RGB_to_HSV([0.45620519, 0.03081071, 0.04091952])
array([ 0.99603944,  0.93246304,  0.45620519])
Prismatic Colourspace
>>> colour.RGB_to_Prismatic([0.25, 0.50, 0.75])
array([ 0.75      ,  0.16666667,  0.33333333,  0.5       ])

RGB Colourspaces

>>> sorted(colour.RGB_COLOURSPACES.keys())
['ACES2065-1',
 'ACEScc',
 'ACEScct',
 'ACEScg',
 'ACESproxy',
 'ALEXA Wide Gamut',
 'Adobe RGB (1998)',
 'Adobe Wide Gamut RGB',
 'Apple RGB',
 'Best RGB',
 'Beta RGB',
 'CIE RGB',
 'Cinema Gamut',
 'ColorMatch RGB',
 'DCDM XYZ',
 'DCI-P3',
 'DCI-P3+',
 'DJI D-Gamut',
 'DRAGONcolor',
 'DRAGONcolor2',
 'Don RGB 4',
 'ECI RGB v2',
 'ERIMM RGB',
 'Ekta Space PS 5',
 'FilmLight E-Gamut',
 'ITU-R BT.2020',
 'ITU-R BT.470 - 525',
 'ITU-R BT.470 - 625',
 'ITU-R BT.709',
 'Max RGB',
 'NTSC',
 'P3-D65',
 'Pal/Secam',
 'ProPhoto RGB',
 'Protune Native',
 'REDWideGamutRGB',
 'REDcolor',
 'REDcolor2',
 'REDcolor3',
 'REDcolor4',
 'RIMM RGB',
 'ROMM RGB',
 'Russell RGB',
 'S-Gamut',
 'S-Gamut3',
 'S-Gamut3.Cine',
 'SMPTE 240M',
 'Sharp RGB',
 'V-Gamut',
 'Xtreme RGB',
 'aces',
 'adobe1998',
 'prophoto',
 'sRGB']

OETFs

>>> sorted(colour.OETFS.keys())
['ARIB STD-B67',
 'DICOM GSDF',
 'ITU-R BT.2020',
 'ITU-R BT.2100 HLG',
 'ITU-R BT.2100 PQ',
 'ITU-R BT.601',
 'ITU-R BT.709',
 'ProPhoto RGB',
 'RIMM RGB',
 'ROMM RGB',
 'SMPTE 240M',
 'ST 2084',
 'sRGB']

OETFs Reverse

>>> sorted(colour.OETFS_REVERSE.keys())
['ARIB STD-B67',
 'ITU-R BT.2100 HLD',
 'ITU-R BT.2100 PQ',
 'ITU-R BT.601',
 'ITU-R BT.709',
 'sRGB']

EOTFs

>>> sorted(colour.EOTFS.keys())
['DCDM',
 'DICOM GSDF',
 'ITU-R BT.1886',
 'ITU-R BT.2020',
 'ITU-R BT.2100 HLG',
 'ITU-R BT.2100 PQ',
 'ProPhoto RGB',
 'RIMM RGB',
 'ROMM RGB',
 'SMPTE 240M',
 'ST 2084']

EOTFs Reverse

>>> sorted(colour.EOTFS_REVERSE.keys())
['DCDM', 'ITU-R BT.1886', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ']

OOTFs

>>> sorted(colour.OOTFS.keys())
['ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ']

OOTFs Reverse

>>> sorted(colour.OOTFs_REVERSE.keys())
['ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ']

Log Encoding / Decoding Curves

>>> sorted(colour.LOG_ENCODING_CURVES.keys())
['ACEScc',
 'ACEScct',
 'ACESproxy',
 'ALEXA Log C',
 'Canon Log',
 'Canon Log 2',
 'Canon Log 3',
 'Cineon',
 'D-Log',
 'ERIMM RGB',
 'Filmic Pro 6',
 'Log3G10',
 'Log3G12',
 'PLog',
 'Panalog',
 'Protune',
 'REDLog',
 'REDLogFilm',
 'S-Log',
 'S-Log2',
 'S-Log3',
 'T-Log',
 'V-Log',
 'ViperLog']

Chromatic Adaptation Models

>>> XYZ = [0.20654008, 0.12197225, 0.05136952]
>>> XYZ_w = [0.95045593, 1.00000000, 1.08905775]
>>> XYZ_wr = [1.09846607, 1.00000000, 0.35582280]
>>> colour.chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr)
array([ 0.2533053 ,  0.13765138,  0.01543307])
>>> sorted(colour.CHROMATIC_ADAPTATION_METHODS.keys())
['CIE 1994', 'CMCCAT2000', 'Fairchild 1990', 'Von Kries']

Colour Appearance Models

>>> XYZ = [0.20654008 * 100, 0.12197225 * 100, 0.05136952* 100]
>>> XYZ_w = [95.05, 100.00, 108.88]
>>> L_A = 318.31
>>> Y_b = 20.0
>>> colour.XYZ_to_CIECAM02(XYZ, XYZ_w, L_A, Y_b)
CIECAM02_Specification(J=34.434525727858997, C=67.365010921125915, h=22.279164147957076, s=62.814855853327131, Q=177.47124941102123, M=70.024939419291385, H=2.689608534423904, HC=None)

Colour Difference

>>> Lab_1 = [100.00000000, 21.57210357, 272.22819350]
>>> Lab_2 = [100.00000000, 426.67945353, 72.39590835]
>>> colour.delta_E(Lab_1, Lab_2)
94.035649026659485
>>> sorted(colour.DELTA_E_METHODS.keys())
['CAM02-LCD',
 'CAM02-SCD',
 'CAM02-UCS',
 'CAM16-LCD',
 'CAM16-SCD',
 'CAM16-UCS',
 'CIE 1976',
 'CIE 1994',
 'CIE 2000',
 'CMC',
 'DIN99',
 'cie1976',
 'cie1994',
 'cie2000']

Colour Correction

>>> import numpy as np
>>> RGB = [0.17224810, 0.09170660, 0.06416938]
>>> M_T = np.random.random((24, 3))
>>> M_R = M_T + (np.random.random((24, 3)) - 0.5) * 0.5
>>> colour.colour_correction(RGB, M_T, M_R)
array([ 0.15205429,  0.08974029,  0.04141435])
>>> sorted(colour.COLOUR_CORRECTION_METHODS.keys())
['Cheung 2004', 'Finlayson 2015', 'Vandermonde']

Colour Notation Systems

Munsell Value
>>> colour.munsell_value(12.23634268)
4.0824437076525664
>>> sorted(colour.MUNSELL_VALUE_METHODS.keys())
['ASTM D1535-08',
 'Ladd 1955',
 'McCamy 1987',
 'Moon 1943',
 'Munsell 1933',
 'Priest 1920',
 'Saunderson 1944',
 'astm2008']
Munsell Colour
>>> colour.xyY_to_munsell_colour([0.38736945, 0.35751656, 0.59362000])
'4.2YR 8.1/5.3'
>>> colour.munsell_colour_to_xyY('4.2YR 8.1/5.3')
array([ 0.38736945,  0.35751656,  0.59362   ])

Colour Blindness

>>> import colour
>>> cmfs = colour.LMS_CMFS['Stockman & Sharpe 2 Degree Cone Fundamentals']
>>> colour.anomalous_trichromacy_cmfs_Machado2009(cmfs, np.array([15, 0, 0]))[450]
array([ 0.08912884,  0.0870524 ,  0.955393  ])
>>> primaries = colour.DISPLAYS_RGB_PRIMARIES['Apple Studio Display']
>>> d_LMS = (15, 0, 0)
>>> colour.anomalous_trichromacy_matrix_Machado2009(cmfs, primaries, d_LMS)
array([[-0.27774652,  2.65150084, -1.37375432],
       [ 0.27189369,  0.20047862,  0.52762768],
       [ 0.00644047,  0.25921579,  0.73434374]])

Optical Phenomena

>>> colour.rayleigh_scattering_sd()
SpectralDistribution([[  3.60000000e+02,   5.99101337e-01],
                      [  3.61000000e+02,   5.92170690e-01],
                      [  3.62000000e+02,   5.85341006e-01],
                      ...
                      [  7.78000000e+02,   2.55208377e-02],
                      [  7.79000000e+02,   2.53887969e-02],
                      [  7.80000000e+02,   2.52576106e-02]],
                     interpolator=SpragueInterpolator,
                     interpolator_args={},
                     extrapolator=Extrapolator,
                     extrapolator_args={'right': None, 'method': 'Constant', 'left': None})

Light Quality

Colour Rendering Index
>>> colour.colour_quality_scale(colour.ILLUMINANTS_SDS['FL2'])
64.686416902221609
Colour Quality Scale
>>> colour.colour_rendering_index(colour.ILLUMINANTS_SDS['FL2'])
64.151520202968015

Reflectance Recovery

>>> colour.XYZ_to_sd([0.20654008, 0.12197225, 0.05136952])
SpectralDistribution([[  3.60000000e+02,   7.73462151e-02],
                      [  3.65000000e+02,   7.73632975e-02],
                      [  3.70000000e+02,   7.74299705e-02],
                      ...
                      [  8.20000000e+02,   3.93126353e-01],
                      [  8.25000000e+02,   3.93158148e-01],
                      [  8.30000000e+02,   3.93163548e-01]],
                     interpolator=SpragueInterpolator,
                     interpolator_args={},
                     extrapolator=Extrapolator,
                     extrapolator_args={'right': None, 'method': 'Constant', 'left': None})

>>> sorted(colour.REFLECTANCE_RECOVERY_METHODS.keys())
['Meng 2015', 'Smits 1999']

Correlated Colour Temperature Computation Methods

>>> colour.uv_to_CCT([0.1978, 0.3122])
array([  6.50751282e+03,   3.22335875e-03])
>>> sorted(colour.UV_TO_CCT_METHODS.keys())
['Ohno 2013', 'Robertson 1968', 'ohno2013', 'robertson1968']
>>> sorted(colour.UV_TO_CCT_METHODS.keys())
['Krystek 1985',
 'Ohno 2013',
 'Robertson 1968',
 'ohno2013',
 'robertson1968']
 >>> sorted(colour.XY_TO_CCT_METHODS.keys())
 ['Hernandez 1999', 'McCamy 1992', 'hernandez1999', 'mccamy1992']
 >>> sorted(colour.CCT_TO_XY_METHODS.keys())
 ['CIE Illuminant D Series', 'Kang 2002', 'cie_d', 'kang2002']

Volume

>>> colour.RGB_colourspace_volume_MonteCarlo(colour.RGB_COLOURSPACE['sRGB'])
821958.30000000005

Contrast Sensitivity Function

>>> colour.contrast_sensitivity_function(u=4, X_0=60, E=65)
358.51180789884984
>>> sorted(colour.CONTRAST_SENSITIVITY_METHODS.keys())
['Barten 1999']

IO

Images
>>> RGB = colour.read_image('Ishihara_Colour_Blindness_Test_Plate_3.png')
>>> RGB.shape
(276, 281, 3)
Look Up Table (LUT) Data
>>> LUT = colour.read_LUT('ACES_Proxy_10_to_ACES.cube')
>>> print(LUT)
LUT3x1D - ACES Proxy 10 to ACES
-------------------------------
Dimensions : 2
Domain     : [[0 0 0]
              [1 1 1]]
Size       : (32, 3)

>>> RGB = [0.17224810, 0.09170660, 0.06416938]
>>> LUT.apply(RGB)
array([ 0.00575674,  0.00181493,  0.00121419])

Plotting

Most of the objects are available from the colour.plotting namespace:

>>> from colour.plotting import *
>>> colour_style()
Visible Spectrum
>>> plot_visible_spectrum('CIE 1931 2 Degree Standard Observer')
_images/Examples_Plotting_Visible_Spectrum.png
Spectral Distribution
>>> plot_single_illuminant_sd('FL1')
_images/Examples_Plotting_Illuminant_F1_SD.png
Blackbody
>>> blackbody_sds = [
...     colour.sd_blackbody(i, colour.SpectralShape(0, 10000, 10))
...     for i in range(1000, 15000, 1000)
... ]
>>> plot_multi_sds(
...     blackbody_sds,
...     y_label='W / (sr m$^2$) / m',
...     use_sds_colours=True,
...     normalise_sds_colours=True,
...     legend_location='upper right',
...     bounding_box=(0, 1250, 0, 2.5e15))
_images/Examples_Plotting_Blackbodies.png
Colour Matching Functions
>>> plot_single_cmfs(
...     'Stockman & Sharpe 2 Degree Cone Fundamentals',
...     y_label='Sensitivity',
...     bounding_box=(390, 870, 0, 1.1))
_images/Examples_Plotting_Cone_Fundamentals.png
Luminous Efficiency
>>> sd_mesopic_luminous_efficiency_function = (
...     colour.sd_mesopic_luminous_efficiency_function(0.2))
>>> plot_multi_sds(
...     (sd_mesopic_luminous_efficiency_function,
...      colour.PHOTOPIC_LEFS['CIE 1924 Photopic Standard Observer'],
...      colour.SCOTOPIC_LEFS['CIE 1951 Scotopic Standard Observer']),
...     y_label='Luminous Efficiency',
...     legend_location='upper right',
...     y_tighten=True,
...     margins=(0, 0, 0, .1))
_images/Examples_Plotting_Luminous_Efficiency.png
Colour Checker
>>> from colour.characterisation.dataset.colour_checkers.sds import (
...     COLOURCHECKER_INDEXES_TO_NAMES_MAPPING)
>>> plot_multi_sds(
...     [
...         colour.COLOURCHECKERS_SDS['BabelColor Average'][value]
...         for key, value in sorted(
...             COLOURCHECKER_INDEXES_TO_NAMES_MAPPING.items())
...     ],
...     use_sds_colours=True,
...     title=('BabelColor Average - '
...            'Spectral Distributions'))
_images/Examples_Plotting_BabelColor_Average.png
>>> plot_single_colour_checker('ColorChecker 2005', text_parameters={'visible': False})
_images/Examples_Plotting_ColorChecker_2005.png
Chromaticities Prediction
>>> plot_corresponding_chromaticities_prediction(2, 'Von Kries', 'Bianco')
_images/Examples_Plotting_Chromaticities_Prediction.png
Colour Temperature
>>> plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS(['A', 'B', 'C'])
_images/Examples_Plotting_CCT_CIE_1960_UCS_Chromaticity_Diagram.png
Chromaticities
>>> import numpy as np
>>> RGB = np.random.random((32, 32, 3))
>>> plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931(
...     RGB, 'ITU-R BT.709', colourspaces=['ACEScg', 'S-Gamut'], show_pointer_gamut=True)
_images/Examples_Plotting_Chromaticities_CIE_1931_Chromaticity_Diagram.png
Colour Rendering Index
>>> plot_single_sd_colour_rendering_index_bars(
...     colour.ILLUMINANTS_SDS['FL2'])
_images/Examples_Plotting_CRI.png

Contributing

If you would like to contribute to Colour, please refer to the following Contributing guide.

Changes

The changes are viewable on the Releases page.

Bibliography

The bibliography is available on the Bibliography page.

It is also viewable directly from the repository in BibTeX format.

See Also

Here is a list of notable colour science packages sorted by languages:

Python

.NET

Julia

Matlab & Octave

About

Colour by Colour Developers - 2013-2019
Copyright © 2013-2019 – Colour Developers – colour-science@googlegroups.com
This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause