Colour Science for Python¶

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.
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 will not give you a complete overview of the API but will still be a good introduction.
Note
A directory full of examples is available at this path in your Colour installation: colour/examples. You can also explore it directly on Github: https://github.com/colour-science/colour/tree/master/colour/examples
from colour.plotting import *
colour_plotting_defaults()
visible_spectrum_plot()

Overview¶
Colour is organised around various sub-packages:
- adaptation: Chromatic adaptation models and transformations.
- algebra: Algebra utilities.
- appearance: Colour appearance models.
- biochemistry: Biochemistry computations.
- continuous: Base objects for continuous data representation.
- 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] + ['...'])
['handle_numpy_errors', 'ignore_numpy_errors', 'raise_numpy_errors', 'print_numpy_errors', 'warn_numpy_errors', '...']
The various sub-packages also expose their public API:
from pprint import pprint
import colour.plotting
for sub_package in ('adaptation', 'algebra', 'appearance', 'biochemistry',
'characterisation', 'colorimetry', 'constants',
'continuous', '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',
'...']
Characterisation
['RGB_SpectralSensitivities',
'RGB_DisplayPrimaries',
'CAMERAS_RGB_SPECTRAL_SENSITIVITIES',
'COLOURCHECKERS',
'COLOURCHECKER_INDEXES_TO_NAMES_MAPPING',
'...']
Colorimetry
['SpectralShape',
'SpectralPowerDistribution',
'MultiSpectralPowerDistribution',
'DEFAULT_SPECTRAL_SHAPE',
'constant_spd',
'...']
Continuous
['AbstractContinuousFunction', 'Signal', 'MultiSignal', '...']
Constants
['CIE_E', 'CIE_K', 'K_M', 'KP_M', 'AVOGADRO_CONSTANT', '...']
Corresponding
['BRENEMAN_EXPERIMENTS',
'BRENEMAN_EXPERIMENTS_PRIMARIES_CHROMATICITIES',
'corresponding_chromaticities_prediction_CIE1994',
'corresponding_chromaticities_prediction_CMCCAT2000',
'corresponding_chromaticities_prediction_Fairchild1990',
'...']
Difference
['DELTA_E_METHODS',
'delta_E',
'delta_E_CIE1976',
'delta_E_CIE1994',
'delta_E_CIE2000',
'...']
Io
['IES_TM2714_Spd',
'read_image',
'write_image',
'read_spectral_data_from_csv_file',
'read_spds_from_csv_file',
'...']
Models
['XYZ_to_xyY', 'xyY_to_XYZ', 'xy_to_xyY', 'xyY_to_xy', 'xy_to_XYZ', '...']
Notation
['MUNSELL_COLOURS_ALL',
'MUNSELL_COLOURS_1929',
'MUNSELL_COLOURS_REAL',
'MUNSELL_COLOURS',
'munsell_value',
'...']
Phenomena
['scattering_cross_section',
'rayleigh_optical_depth',
'rayleigh_scattering',
'rayleigh_scattering_spd',
'...']
Plotting
['ASTM_G_173_ETR',
'PLOTTING_RESOURCES_DIRECTORY',
'DEFAULT_FIGURE_ASPECT_RATIO',
'DEFAULT_FIGURE_WIDTH',
'DEFAULT_FIGURE_HEIGHT',
'...']
Quality
['TCS_SPDS',
'VS_SPDS',
'CRI_Specification',
'colour_rendering_index',
'CQS_Specification',
'...']
Recovery
['SMITS_1999_SPDS',
'XYZ_to_spectral_Meng2015',
'RGB_to_spectral_Smits1999',
'REFLECTANCE_RECOVERY_METHODS',
'XYZ_to_spectral',
'...']
Temperature
['CCT_TO_UV_METHODS',
'UV_TO_CCT_METHODS',
'CCT_to_uv',
'CCT_to_uv_Ohno2013',
'CCT_to_uv_Robertson1968',
'...']
Utilities
['handle_numpy_errors',
'ignore_numpy_errors',
'raise_numpy_errors',
'print_numpy_errors',
'warn_numpy_errors',
'...']
Volume
['ILLUMINANTS_OPTIMAL_COLOUR_STIMULI',
'is_within_macadam_limits',
'is_within_mesh_volume',
'is_within_pointer_gamut',
'is_within_visible_spectrum',
'...']
The code is documented and almost every 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
----------
.. [4] Ohno, Y. (2014). Practical Use and Calculation of CCT and Duv.
LEUKOS, 10(1), 47–55. doi:10.1080/15502724.2014.839020
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 related computations and many others:
import colour.colorimetry as colorimetry
pprint(colorimetry.__all__)
['SpectralShape',
'SpectralPowerDistribution',
'MultiSpectralPowerDistribution',
'DEFAULT_SPECTRAL_SHAPE',
'constant_spd',
'zeros_spd',
'ones_spd',
'blackbody_spd',
'blackbody_spectral_radiance',
'planck_law',
'LMS_ConeFundamentals',
'RGB_ColourMatchingFunctions',
'XYZ_ColourMatchingFunctions',
'CMFS',
'LMS_CMFS',
'RGB_CMFS',
'STANDARD_OBSERVERS_CMFS',
'ILLUMINANTS',
'D_ILLUMINANTS_S_SPDS',
'HUNTERLAB_ILLUMINANTS',
'ILLUMINANTS_RELATIVE_SPDS',
'LIGHT_SOURCES',
'LIGHT_SOURCES_RELATIVE_SPDS',
'LEFS',
'PHOTOPIC_LEFS',
'SCOTOPIC_LEFS',
'BANDPASS_CORRECTION_METHODS',
'bandpass_correction',
'bandpass_correction_Stearns1988',
'D_illuminant_relative_spd',
'CIE_standard_illuminant_A_function',
'mesopic_luminous_efficiency_function',
'mesopic_weighting_function',
'LIGHTNESS_METHODS',
'lightness',
'lightness_Glasser1958',
'lightness_Wyszecki1963',
'lightness_CIE1976',
'lightness_Fairchild2010',
'lightness_Fairchild2011',
'LUMINANCE_METHODS',
'luminance',
'luminance_Newhall1943',
'luminance_ASTMD153508',
'luminance_CIE1976',
'luminance_Fairchild2010',
'luminance_Fairchild2011',
'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',
'SPECTRAL_TO_XYZ_METHODS',
'spectral_to_XYZ',
'ASTME30815_PRACTISE_SHAPE',
'lagrange_coefficients_ASTME202211',
'tristimulus_weighting_factors_ASTME202211',
'adjust_tristimulus_weighting_factors_ASTME30815',
'spectral_to_XYZ_integration',
'spectral_to_XYZ_tristimulus_weighting_factors_ASTME30815',
'spectral_to_XYZ_ASTME30815',
'wavelength_to_XYZ',
'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 pretty much each
sub-packages, for example colour.colorimetry.dataset
defines the
following data:
import colour.colorimetry.dataset as dataset
pprint(dataset.__all__)
['CMFS',
'LMS_CMFS',
'RGB_CMFS',
'STANDARD_OBSERVERS_CMFS',
'ILLUMINANTS',
'D_ILLUMINANTS_S_SPDS',
'HUNTERLAB_ILLUMINANTS',
'ILLUMINANTS_RELATIVE_SPDS',
'LIGHT_SOURCES',
'LIGHT_SOURCES_RELATIVE_SPDS',
'LEFS',
'PHOTOPIC_LEFS',
'SCOTOPIC_LEFS']
From Spectral Power Distribution¶
Whether it be a sample spectral power distribution, colour matching
functions or illuminants, spectral data is manipulated using an object
built with the colour.SpectralPowerDistribution
class or based on
it:
# Defining a sample spectral power distribution data.
sample_spd_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}
spd = colour.SpectralPowerDistribution(sample_spd_data, name='Sample')
print(repr(spd))
SpectralPowerDistribution([[ 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 power distribution can be easily plotted against the visible spectrum:
# Plotting the sample spectral power distribution.
single_spd_plot(spd)

With the sample spectral power distribution defined, we can retrieve its shape:
# Displaying the sample spectral power distribution shape.
print(spd.shape)
(380.0, 780.0, 5.0)
The shape returned is an instance of colour.SpectralShape
class:
repr(spd.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 power distributions:
colour.constant_spd
colour.zeros_spd
colour.ones_spd
# Defining a constant spectral power distribution.
constant_spd = colour.constant_spd(100)
print('"Constant Spectral Power Distribution"')
print(constant_spd.shape)
print(constant_spd[400])
# Defining a zeros filled spectral power distribution.
print('\n"Zeros Filled Spectral Power Distribution"')
zeros_spd = colour.zeros_spd()
print(zeros_spd.shape)
print(zeros_spd[400])
# Defining a ones filled spectral power distribution.
print('\n"Ones Filled Spectral Power Distribution"')
ones_spd = colour.ones_spd()
print(ones_spd.shape)
print(ones_spd[400])
"Constant Spectral Power Distribution"
(360.0, 780.0, 1.0)
100.0
"Zeros Filled Spectral Power Distribution"
(360.0, 780.0, 1.0)
0.0
"Ones Filled Spectral Power Distribution"
(360.0, 780.0, 1.0)
1.0
By default the shape used by colour.constant_spd
,
colour.zeros_spd
and colour.ones_spd
is the one defined by
colour.DEFAULT_SPECTRAL_SHAPE
attribute using the CIE 1931 2°
Standard Observer shape.
print(repr(colour.DEFAULT_SPECTRAL_SHAPE))
SpectralShape(360, 780, 1)
A custom shape can be passed to construct a constant spectral power distribution with user defined dimensions:
colour.ones_spd(colour.SpectralShape(400, 700, 5))[450]
1.0
The colour.SpectralPowerDistribution
class supports the following
arithmetical operations:
- addition
- subtraction
- multiplication
- division
spd1 = colour.ones_spd()
print('"Ones Filled Spectral Power Distribution"')
print(spd1[400])
print('\n"x2 Constant Multiplied"')
print((spd1 * 2)[400])
print('\n"+ Spectral Power Distribution"')
print((spd1 + colour.ones_spd())[400])
"Ones Filled Spectral Power Distribution"
1.0
"x2 Constant Multiplied"
2.0
"+ Spectral Power Distribution"
2.0
Often interpolation of the spectral power distribution is needed, this
is achieved with the colour.SpectralPowerDistribution.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].
We can check the uniformity of the sample spectral power distribution:
# Checking the sample spectral power distribution uniformity.
print(spd.is_uniform())
True
Since the sample spectral power distribution is uniform the
interpolation will default to the colour.SpragueInterpolator
interpolator.
Note
Interpolation happens in place and may alter your original
data, use the colour.SpectralPowerDistribution.copy
method to
produce a copy of your spectral power distribution before
interpolation.
# *Colour* can emit a substantial amount of warnings, we filter them.
colour.filter_warnings()
# Copying the sample spectral power distribution.
spd_copy = spd.copy()
# Interpolating the copied sample spectral power distribution.
spd_copy.interpolate(colour.SpectralShape(400, 770, 1))
spd_copy[401]
0.065809599999999996
# Comparing the interpolated spectral power distribution with the original one.
multi_spd_plot([spd, spd_copy], bounding_box=[730,780, 0.25, 0.5])

Extrapolation although dangerous can be used to help aligning two spectral power 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 power distribution.
spd_copy.extrapolate(colour.SpectralShape(340, 830))
spd_copy[340], spd_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 power distribution.
spd_copy.interpolate(
colour.SpectralShape(400, 700, 10), interpolator=colour.LinearInterpolator)
SpectralPowerDistribution([[ 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 power distribution with *Linear* method.
spd_copy.extrapolate(
colour.SpectralShape(340, 830),
extrapolator_args={'method': 'Linear',
'right': 0})
spd_copy[340], spd_copy[830]
(0.046999999999999348, 0.0)
Aligning a spectral power 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 power distribution.
# We first trim the spectral power distribution as above.
spd_copy.interpolate(colour.SpectralShape(400, 700))
spd_copy.align(colour.SpectralShape(340, 830, 5))
spd_copy[340], spd_copy[830]
(0.065000000000000002, 0.28199999999999975)
The colour.SpectralPowerDistribution
class also supports various
arithmetic operations like addition, subtraction, multiplication
or division with numeric and array_like variables or other
colour.SpectralPowerDistribution
class instances:
spd = colour.SpectralPowerDistribution({
410: 0.25,
420: 0.50,
430: 0.75,
440: 1.0,
450: 0.75,
460: 0.50,
480: 0.25
})
print((spd.copy() + 1).values)
print((spd.copy() * 2).values)
print((spd * [0.35, 1.55, 0.75, 2.55, 0.95, 0.65, 0.15]).values)
print((spd * colour.constant_spd(2, spd.shape) * colour.constant_spd(3, spd.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 power distribution can be normalised with an arbitrary factor:
print(spd.normalise().values)
print(spd.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.SpectralPowerDistribution
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 we can illustrate its core capability.
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 power distribution, CIE XYZ tristimulus values can be calculated:
spd = colour.SpectralPowerDistribution(sample_spd_data)
cmfs = colour.STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer']
illuminant = colour.ILLUMINANTS_RELATIVE_SPDS['D65']
# Calculating the sample spectral power distribution *CIE XYZ* tristimulus values.
XYZ = colour.spectral_to_XYZ(spd, 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, cascading 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_Hunt',
'XYZ_to_ATD95',
'XYZ_to_CIECAM02',
'XYZ_to_LLAB',
'XYZ_to_Nayatani95',
'XYZ_to_RLAB',
'XYZ_to_xyY',
'XYZ_to_xy',
'XYZ_to_Lab',
'XYZ_to_Luv',
'XYZ_to_UCS',
'XYZ_to_UVW',
'XYZ_to_hdr_CIELab',
'XYZ_to_K_ab_HunterLab1966',
'XYZ_to_Hunter_Lab',
'XYZ_to_Hunter_Rdab',
'XYZ_to_Hunter_Rdab',
'XYZ_to_IPT',
'XYZ_to_hdr_IPT',
'XYZ_to_colourspace_model',
'XYZ_to_RGB',
'XYZ_to_sRGB',
'XYZ_to_spectral_Meng2015',
'XYZ_to_spectral']
Convert to Screen Colours¶
We can for instance converts the CIE XYZ tristimulus values into sRGB colourspace RGB values in order to display them on screen:
# The output domain of *colour.spectral_to_XYZ* is [0, 100] and the input
# domain of *colour.XYZ_to_sRGB* is [0, 1]. We need to take it in account and
# rescale the input *CIE XYZ* colourspace matrix.
RGB = colour.XYZ_to_sRGB(XYZ / 100)
print(RGB)
[ 0.45675795 0.30986982 0.24861924]
# Plotting the *sRGB* colourspace colour of the *Sample* spectral power distribution.
single_colour_swatch_plot(ColourSwatch('Sample', RGB), text_size=32)

Generate Colour Rendition Charts¶
In the same way, we can compute values from a colour rendition chart sample.
Note
This is useful for render time checks in the VFX industry, where you can use a synthetic colour chart into your render and 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 power distributions.
print(sorted(colour.characterisation.COLOURCHECKERS_SPDS.keys()))
[u'BabelColor Average', u'ColorChecker 1976', u'ColorChecker 2005', u'babel_average', u'cc2005']
[u'BabelColor Average', u'ColorChecker N Ohta', u'babel_average', u'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_spd = colour.COLOURCHECKERS_SPDS['ColorChecker N Ohta'][patch_name]
XYZ = colour.spectral_to_XYZ(patch_spd, cmfs, illuminant)
RGB = colour.XYZ_to_sRGB(XYZ / 100)
single_colour_swatch_plot(ColourSwatch(patch_name.title(), RGB), text_size=32)

Colour defines a convenient plotting object to draw synthetic colour rendition charts figures:
colour_checker_plot(colour_checker='ColorChecker 2005', text_display=False)

Convert to Chromaticity Coordinates¶
Given a spectral power 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 pylab
# 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.
chromaticity_diagram_plot_CIE1931(standalone=False)
# Plotting the *xy* chromaticity coordinates.
x, y = xy
pylab.plot(x, y, 'o-', color='white')
# Annotating the plot.
pylab.annotate(patch_spd.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)

And More…¶
We hope that this small introduction has been useful and gave you the envy to see more, if you want to explore the API a good place to start is the Jupyter Notebooks page.
Reference¶
Colour¶
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. |
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. |
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. |
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. |
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¶
colour
Extrapolator ([interpolator, method, left, …]) |
Extrapolates the 1-D function of given interpolator. |
colour
KernelInterpolator (x, y[, window, kernel, …]) |
Kernel based interpolation of a 1-D function. |
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\). |
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. |
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\). |
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. |
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. |
colour.algebra
random_triplet_generator (size[, limits, …]) |
Returns a generator yielding random triplets. |
Colour Appearance Models¶
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. |
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. |
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. |
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. |
colour
XYZ_to_LLAB (XYZ, XYZ_0, Y_b, L[, surround, …]) |
Computes the LLAB(l:c) colour appearance model correlates. |
LLAB_Specification |
Defines the 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 |
LLAB(l:c) colour appearance model induction factors. |
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. |
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¶
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 Characterisation¶
colour
first_order_colour_fit (m_1, m_2) |
Performs a first order colour fit from given \(m_1\) colour array to \(m_2\) colour array. |
Dataset
colour
COLOURCHECKERS |
Aggregated ColourCheckers chromaticity coordinates. |
COLOURCHECKERS_SPDS |
Aggregated ColourCheckers spectral power distributions. |
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. |
colour.characterisation
RGB_DisplayPrimaries ([data, domain, labels]) |
Implements support for a RGB display (such as a CRT or LCD) primaries multi-spectral power distributions. |
Dataset
colour
DISPLAYS_RGB_PRIMARIES |
Displays RGB primaries multi-spectral power distributions. |
Colorimetry¶
- Spectral Data Structure
- Spectral Data Generation
- Conversion to Tristimulus Values
- Spectral Bandpass Dependence Correction
- Colour Matching Functions
- Colour Matching Functions Transformations
- Illuminants and Light Sources
- Dominant Wavelength and Purity
- Luminous Efficiency Functions
- Lightness Computation
- Luminance Computation
- Whiteness Computation
- Yellowness Computation
colour
SpectralPowerDistribution ([data, domain]) |
Defines the spectral power distribution: the base object for spectral computations. |
MultiSpectralPowerDistribution ([data, …]) |
Defines multi-spectral power distribution: the base object for multi spectral computations. |
SpectralShape ([start, end, interval]) |
Defines the base object for spectral power distribution shape. |
DEFAULT_SPECTRAL_SHAPE |
Default spectral shape according to ASTM E308-15 practise shape. |
ASTME30815_PRACTISE_SHAPE |
Shape for *ASTM E308-15 practise* – (360, 780, 1). |
colour
blackbody_spd (temperature[, shape, c1, c2, n]) |
Returns the spectral power distribution of the planckian radiator for given temperature \(T[K]\). |
CIE_standard_illuminant_A_function (wl) |
CIE Standard Illuminant A is intended to represent typical, domestic, |
D_illuminant_relative_spd (xy) |
Returns the relative spectral power distribution of given CIE Standard Illuminant D Series using given xy chromaticity coordinates. |
constant_spd (k[, shape, dtype]) |
Returns a spectral power distribution of given spectral shape filled with constant \(k\) values. |
ones_spd ([shape]) |
Returns a spectral power distribution of given spectral shape filled with ones. |
zeros_spd ([shape]) |
Returns a spectral power distribution of given spectral shape filled with zeros. |
colour.colorimetry
blackbody_spectral_radiance (wavelength, …) |
Returns the spectral radiance of a blackbody at thermodynamic temperature \(T[K]\) in a medium having index of refraction \(n\). |
planck_law (wavelength, temperature[, c1, c2, n]) |
Returns the spectral radiance of a blackbody at thermodynamic temperature \(T[K]\) in a medium having index of refraction \(n\). |
colour
spectral_to_XYZ (spd[, cmfs, illuminant, method]) |
Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions, illuminant and method. |
SPECTRAL_TO_XYZ_METHODS |
Supported spectral power distribution to CIE XYZ tristimulus values |
wavelength_to_XYZ (wavelength[, cmfs]) |
Converts given wavelength \(\lambda\) to CIE XYZ tristimulus values using given colour matching functions. |
colour.colorimetry
spectral_to_XYZ_ASTME30815 (spd[, cmfs, …]) |
Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to practise ASTM E308-15 method. |
Ancillary Objects
colour.colorimetry
spectral_to_XYZ_tristimulus_weighting_factors_ASTME30815 (spd) |
Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant using a table of tristimulus weighting factors according to practise ASTM E308-15 method. |
adjust_tristimulus_weighting_factors_ASTME30815 (W, …) |
Adjusts given table of tristimulus weighting factors to account for a shorter wavelengths range of the test spectral shape compared to the reference spectral shape using practise ASTM E308-15 method: Weights at the wavelengths for which data are not available are added to the weights at the shortest and longest wavelength for which spectral data are available. |
lagrange_coefficients_ASTME202211 ([…]) |
Computes the Lagrange Coefficients for given interval size using practise ASTM E2022-11 method. |
tristimulus_weighting_factors_ASTME202211 (…) |
Returns a table of tristimulus weighting factors for given colour matching functions and illuminant using practise ASTM E2022-11 method. |
colour.colorimetry
spectral_to_XYZ_integration (spd[, cmfs, …]) |
Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to classical integration method. |
colour
bandpass_correction (spd[, method]) |
Implements spectral bandpass dependence correction on given spectral power distribution using given method. |
BANDPASS_CORRECTION_METHODS |
Supported spectral bandpass dependence correction methods. |
colour.colorimetry
bandpass_correction_Stearns1988 (spd) |
Implements spectral bandpass dependence correction on given spectral power distribution using Stearns and Stearns (1988) method. |
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. |
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. |
Dataset
colour
ILLUMINANTS |
Aggregated CIE illuminants chromaticity coordinates. |
ILLUMINANTS_RELATIVE_SPDS |
CIE illuminants relative spectral power distributions. |
HUNTERLAB_ILLUMINANTS |
Aggregated Hunter L,a,b illuminant dataset. |
LIGHT_SOURCES |
Aggregated light sources chromaticity coordinates. |
LIGHT_SOURCES_RELATIVE_SPDS |
Aggregated light sources spectral power distributions. |
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\). |
colour
luminous_efficacy (spd[, lef]) |
Returns the luminous efficacy in \(lm\cdot W^{-1}\) of given spectral power distribution using given luminous efficiency function. |
luminous_efficiency (spd[, lef]) |
Returns the luminous efficiency of given spectral power distribution using given luminous efficiency function. |
luminous_flux (spd[, lef, K_m]) |
Returns the luminous flux for given spectral power distribution using given luminous efficiency function. |
mesopic_luminous_efficiency_function (Lp[, …]) |
Returns the mesopic luminous efficiency function \(V_m(\lambda)\) for given photopic luminance \(L_p\). |
Dataset
colour
LEFS |
Aggregated luminous efficiency functions. |
PHOTOPIC_LEFS |
Photopic luminous efficiency functions. |
SCOTOPIC_LEFS |
Scotopic luminous efficiency functions. |
colour
lightness (Y[, method]) |
Returns the Lightness \(L\) using given method. |
LIGHTNESS_METHODS |
Supported Lightness computations methods. |
colour.colorimetry
lightness_Glasser1958 (Y) |
Returns the Lightness \(L\) of given luminance \(Y\) using Glasser et alii (1958) method. |
colour.colorimetry
lightness_Wyszecki1963 (Y) |
Returns the Lightness \(W\) of given luminance \(Y\) using Wyszecki (1963) method. |
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. |
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. |
colour.colorimetry
lightness_Fairchild2011 (Y[, epsilon, method]) |
Computes Lightness \(L_{hdr}\) of given luminance \(Y\) using Fairchild and Chen (2011) method accordingly to Michealis-Menten kinetics. |
colour
luminance (LV[, method]) |
Returns the luminance \(Y\) of given Lightness \(L^*\) or given Munsell value \(V\). |
LUMINANCE_METHODS |
Supported luminance computations methods. |
colour.colorimetry
luminance_Newhall1943 (V) |
Returns the luminance \(R_Y\) of given Munsell value \(V\) using Newhall et alii (1943) method. |
colour.colorimetry
luminance_CIE1976 (Lstar[, Y_n]) |
Returns the luminance \(Y\) of given Lightness \(L^*\) with given reference white luminance \(Y_n\). |
colour.colorimetry
luminance_ASTMD153508 (V) |
Returns the luminance \(Y\) of given Munsell value \(V\) using ASTM D1535-08e1 method. |
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. |
colour.colorimetry
luminance_Fairchild2011 (L_hdr[, epsilon, method]) |
Computes luminance \(Y\) of given Lightness \(L_{hdr}\) using Fairchild and Chen (2011) method accordingly to Michealis-Menten kinetics. |
colour
whiteness ([method]) |
Returns the whiteness \(W\) using given method. |
WHITENESS_METHODS |
Supported whiteness computations methods. |
colour.colorimetry
whiteness_Berger1959 (XYZ, XYZ_0) |
Returns the whiteness index \(WI\) of given sample CIE XYZ tristimulus values using Berger (1959) method. |
colour.colorimetry
whiteness_Taube1960 (XYZ, XYZ_0) |
Returns the whiteness index \(WI\) of given sample CIE XYZ tristimulus values using Taube (1960) method. |
colour.colorimetry
whiteness_Stensby1968 (Lab) |
Returns the whiteness index \(WI\) of given sample CIE L*a*b* colourspace array using Stensby (1968) method. |
colour.colorimetry
whiteness_ASTME313 (XYZ) |
Returns the whiteness index \(WI\) of given sample CIE XYZ tristimulus values using ASTM E313 method. |
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. |
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. |
colour
yellowness (XYZ[, method]) |
Returns the yellowness \(W\) using given method. |
YELLOWNESS_METHODS |
Supported yellowness computations methods. |
colour.colorimetry
yellowness_ASTMD1925 (XYZ) |
Returns the yellowness index \(YI\) of given sample CIE XYZ tristimulus values using ASTM D1925 method. |
colour.colorimetry
yellowness_ASTME313 (XYZ) |
Returns the yellowness index \(YI\) of given sample CIE XYZ tristimulus values using ASTM E313 method. |
Constants¶
colour.constants
CIE_E |
CIE \(\epsilon\) constant. |
CIE_K |
CIE \(\kappa\) constant. |
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}\). |
colour.constants
AVOGADRO_CONSTANT |
Avogadro constant. |
BOLTZMANN_CONSTANT |
Boltzmann constant. |
LIGHT_SPEED |
Speed of light in vacuum. |
PLANCK_CONSTANT |
Planck constant. |
colour.constants
DEFAULT_FLOAT_DTYPE |
alias of float64 |
EPSILON |
|
FLOATING_POINT_NUMBER_PATTERN |
unicode(object=’‘) -> unicode object |
INTEGER_THRESHOLD |
Integer threshold value. |
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¶
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. |
colour.corresponding
corresponding_chromaticities_prediction_Fairchild1990 ([…]) |
Returns the corresponding chromaticities prediction for Fairchild (1990) chromatic adaptation model. |
colour.corresponding
corresponding_chromaticities_prediction_CIE1994 ([…]) |
Returns the corresponding chromaticities prediction for CIE 1994 chromatic adaptation model. |
colour.corresponding
corresponding_chromaticities_prediction_CMCCAT2000 ([…]) |
Returns the corresponding chromaticities prediction for CMCCAT2000 chromatic adaptation model. |
colour.corresponding
corresponding_chromaticities_prediction_VonKries ([…]) |
Returns the corresponding chromaticities prediction for Von Kries chromatic adaptation model using given transform. |
Colour Difference¶
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. |
colour.difference
delta_E_CIE1976 (Lab_1, Lab_2) |
Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* colourspace arrays using CIE 1976 recommendation. |
colour.difference
delta_E_CIE1994 (Lab_1, Lab_2[, textiles]) |
Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* colourspace arrays using CIE 1994 recommendation. |
colour.difference
delta_E_CIE2000 (Lab_1, Lab_2[, textiles]) |
Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* colourspace arrays using CIE 2000 recommendation. |
colour.difference
delta_E_CMC (Lab_1, Lab_2[, l, c]) |
Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* colourspace arrays using Colour Measurement Committee recommendation. |
colour.difference
delta_E_CAM02LCD (Jpapbp_1, Jpapbp_2) |
Returns the difference \(\Delta E'\) between two given Li et alii (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 alii (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 alii (2017) CAM16-UCS colourspaces \(J'a'b'\) arrays. |
colour.difference
delta_E_CAM16LCD (Jpapbp_1, Jpapbp_2) |
Returns the difference \(\Delta E'\) between two given Li et alii (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 alii (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 alii (2017) CAM16-UCS colourspaces \(J'a'b'\) arrays. |
Input and Output¶
colour
read_image (path[, bit_depth]) |
Reads given image using OpenImageIO. |
write_image (image, path[, bit_depth]) |
Writes given image using OpenImageIO. |
colour
read_spds_from_csv_file (path[, delimiter, …]) |
Reads the spectral data from given CSV file and return its content as an OrderedDict of colour.SpectralPowerDistribution classes. |
read_spectral_data_from_csv_file (path[, …]) |
Reads the spectral data from given CSV file in the following form: |
write_spds_to_csv_file (spds, path[, …]) |
Writes the given spectral power distributions to given CSV file. |
colour
IES_TM2714_Spd ([path, header, …]) |
Defines a IES TM-27-14 spectral power distribution. |
colour
read_spds_from_xrite_file (path) |
Reads the spectral data from given X-Rite file and returns it as an OrderedDict of colour.SpectralPowerDistribution classes. |
Colour Models¶
- Tristimulus Values, CIE xyY Colourspace and Chromaticity Coordinates
- CIE L*a*b* Colourspace
- CIE L*u*v* Colourspace
- CIE UCS Colourspace
- CIE 1964 U*V*W* Colourspace
- Hunter L,a,b Colour Scale
- Hunter Rd,a,b Colour Scale
- Luo, Cui and Li (2006)
- Li, Li, Wang, Zu, Luo, Cui, Melgosa, Brill and Pointer (2017)
- IPT Colourspace
- hdr-IPT Colourspace
- hdr-CIELAB Colourspace
- RGB Colourspace and Transformations
- Pointer’s Gamut
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. |
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. |
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. |
colour
XYZ_to_UCS (XYZ) |
Converts from CIE XYZ tristimulus values to CIE UCS colourspace. |
UCS_to_XYZ (UVW) |
Converts from CIE UCS colourspace to CIE XYZ tristimulus values. |
UCS_to_uv (UVW) |
Returns the uv chromaticity coordinates from given CIE UCS colourspace array. |
UCS_uv_to_xy (uv) |
Returns the xy chromaticity coordinates from given CIE UCS colourspace uv chromaticity coordinates. |
colour
XYZ_to_UVW (XYZ[, illuminant]) |
Converts from CIE XYZ tristimulus values to CIE 1964 U*V*W* colourspace. |
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. |
colour
XYZ_to_Hunter_Rdab (XYZ[, XYZ_n, K_ab]) |
Converts from CIE XYZ tristimulus values to Hunter Rd,a,b colour scale. |
colour
JMh_CIECAM02_to_CAM02LCD (JMh) |
Converts from CIECAM02 \(JMh\) correlates array to Luo et alii (2006) CAM02-LCD colourspace \(J'a'b'\) array. |
CAM02LCD_to_JMh_CIECAM02 (Jpapbp) |
Converts from Luo et alii (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 alii (2006) CAM02-SCD colourspace \(J'a'b'\) array. |
CAM02SCD_to_JMh_CIECAM02 (Jpapbp) |
Converts from Luo et alii (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 alii (2006) CAM02-UCS colourspace \(J'a'b'\) array. |
CAM02UCS_to_JMh_CIECAM02 (Jpapbp) |
Converts from Luo et alii (2006) CAM02-UCS colourspace \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array. |
colour
JMh_CAM16_to_CAM16LCD |
Converts from CAM16 \(JMh\) correlates array to Li et alii (2017) CAM16-LCD colourspace \(J'a'b'\) array. |
CAM16LCD_to_JMh_CAM16 |
Converts from Li et alii (2017) CAM16-LCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array. |
JMh_CAM16_to_CAM16SCD |
Converts from CAM16 \(JMh\) correlates array to Li et alii (2017) CAM16-SCD colourspace \(J'a'b'\) array. |
CAM16SCD_to_JMh_CAM16 |
Converts from Li et alii (2017) CAM16-SCD colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array. |
JMh_CAM16_to_CAM16UCS |
Converts from CAM16 \(JMh\) correlates array to Li et alii (2017) CAM16-UCS colourspace \(J'a'b'\) array. |
CAM16UCS_to_JMh_CAM16 |
Converts from Li et alii (2017) CAM16-UCS colourspace \(J'a'b'\) array to CAM16 \(JMh\) correlates array. |
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. |
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. |
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. |
colour
XYZ_to_RGB (XYZ, illuminant_XYZ, …[, …]) |
Converts from CIE XYZ tristimulus values to given RGB colourspace. |
RGB_to_XYZ (RGB, illuminant_RGB, …[, …]) |
Converts from given RGB colourspace to CIE XYZ tristimulus values. |
RGB_to_RGB (RGB, input_colourspace, …[, …]) |
Converts 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. |
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. |
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 |
ACES_CC_COLOURSPACE |
ACEScc colourspace, a working space for color correctors, target for ASC-CDL |
ACES_CCT_COLOURSPACE |
ACEScct colourspace, an alternative working space for colour correctors, |
ACES_PROXY_COLOURSPACE |
ACESproxy colourspace, a lightweight encoding for transmission over HD-SDI |
ACES_CG_COLOURSPACE |
ACEScg colourspace, a working space for paint/compositor applications that |
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. |
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. |
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. In cases in which it is necessary to identify a |
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. |
Ancillary Objects
colour.models
spectral_to_aces_relative_exposure_values (spd) |
Converts given spectral power distribution to ACES2065-1 colourspace relative exposure values. |
ACES_RICD |
Implements support for the CIE RGB colour matching 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]) |
Defines ARIB STD-B67 (Hybrid Log-Gamma) opto-electrical transfer function (OETF / OECF). |
oetf_reverse_ARIBSTDB67 (E_p[, r]) |
Defines ARIB STD-B67 (Hybrid Log-Gamma) reverse opto-electrical transfer function (OETF / OECF). |
oetf_DCIP3 (XYZ) |
Defines the DCI-P3 colourspace opto-electronic transfer function (OETF / OECF). |
oetf_DICOMGSDF (L) |
Defines the DICOM - Grayscale Standard Display Function opto-electronic transfer function (OETF / OECF). |
oetf_BT2020 (E[, is_12_bits_system]) |
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[, I_max]) |
Defines the ROMM RGB encoding opto-electronic transfer function (OETF / OECF). |
oetf_RIMMRGB (X[, I_max, E_clip]) |
Defines the RIMM RGB encoding opto-electronic transfer function (OETF / OECF). |
oetf_ROMMRGB (X[, I_max]) |
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]) |
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
function_gamma (a[, exponent, …]) |
Defines a typical gamma encoding / decoding function. |
function_linear (a) |
Defines a typical linear encoding / decoding function, essentially a pass-through function. |
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_DCIP3 (XYZ_p) |
Defines the DCI-P3 colourspace electro-optical transfer function (EOTF / EOCF). |
eotf_DICOMGSDF (J) |
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]) |
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[, I_max]) |
Defines the ROMM RGB encoding electro-optical transfer function (EOTF / EOCF). |
eotf_RIMMRGB (X_p[, I_max, E_clip]) |
Defines the RIMM RGB encoding electro-optical transfer function (EOTF / EOCF). |
eotf_ROMMRGB (X_p[, I_max]) |
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]) |
Defines SMPTE ST 2084:2014 optimised perceptual electro-optical transfer function (EOTF / EOCF). |
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). |
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) |
Defines the ACEScct colourspace log encoding / opto-electronic transfer function. |
log_decoding_ACEScct (ACEScct) |
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[, bit_depth]) |
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[, I_max, E_min, E_clip]) |
Defines the ERIMM RGB log encoding curve / opto-electronic transfer function (OETF / OECF). |
log_decoding_ERIMMRGB (X_p[, I_max, E_min, …]) |
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. |
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. |
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. |
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. |
colour
RGB_to_HSV (RGB) |
Converts from RGB colourspace to HSV colourspace. |
HSV_to_RGB (HSV) |
Converts from HSV colourspace to RGB colourspace. |
colour
RGB_to_HSL (RGB) |
Converts from RGB colourspace to HSL colourspace. |
HSL_to_RGB (HSL) |
Converts from HSL colourspace to RGB 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¶
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. |
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. |
colour.notation
munsell_value_Priest1920 (Y) |
Returns the Munsell value \(V\) of given luminance \(Y\) using Priest et alii (1920) method. |
colour.notation
munsell_value_Munsell1933 (Y) |
Returns the Munsell value \(V\) of given luminance \(Y\) using Munsell et alii (1933) method. |
colour.notation
munsell_value_Moon1943 (Y) |
Returns the Munsell value \(V\) of given luminance \(Y\) using Moon and Spencer (1943) method. |
colour.notation
munsell_value_Saunderson1944 (Y) |
Returns the Munsell value \(V\) of given luminance \(Y\) using Saunderson and Milner (1944) method. |
colour.notation
munsell_value_Ladd1955 (Y) |
Returns the Munsell value \(V\) of given luminance \(Y\) using Ladd and Pinney (1955) method. |
colour.notation
munsell_value_McCamy1987 (Y) |
Returns the Munsell value \(V\) of given luminance \(Y\) using McCamy (1987) method. |
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. |
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¶
colour
rayleigh_scattering (wavelength[, …]) |
Returns the Rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm). |
rayleigh_scattering_spd ([shape, …]) |
Returns the Rayleigh spectral power 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¶
colour.plotting
colour_plotting_defaults ([parameters]) |
Enables Colour default plotting parameters. |
colour_cycle (**kwargs) |
Returns a colour cycle iterator using given colour map. |
canvas (**kwargs) |
Sets the figure size. |
camera (**kwargs) |
Sets the camera settings. |
decorate (**kwargs) |
Sets the figure decorations. |
boundaries (**kwargs) |
Sets the plot boundaries. |
display (**kwargs) |
Sets the figure display. |
render ([with_boundaries, with_decorate]) |
Convenient wrapper definition combining colour.plotting.decorate() , colour.plotting.boundaries() and colour.plotting.display() definitions. |
label_rectangles (rectangles[, rotation, …]) |
Add labels above given rectangles. |
equal_axes3d (axes) |
Sets equal aspect ratio to given 3d axes. |
single_colour_swatch_plot (colour_swatch, …) |
Plots given colour swatch. |
multi_colour_swatches_plot (colour_swatches) |
Plots given colours swatches. |
image_plot (image[, label, label_size, …]) |
Plots given image. |
colour.plotting
single_spd_plot (spd[, cmfs, …]) |
Plots given spectral power distribution. |
multi_spd_plot (spds[, cmfs, …]) |
Plots given spectral power distributions. |
single_cmfs_plot ([cmfs]) |
Plots given colour matching functions. |
multi_cmfs_plot ([cmfs]) |
Plots given colour matching functions. |
single_illuminant_relative_spd_plot ([…]) |
Plots given single illuminant relative spectral power distribution. |
multi_illuminants_relative_spd_plot ([…]) |
Plots given illuminants relative spectral power distributions. |
visible_spectrum_plot ([cmfs, …]) |
Plots the visible colours spectrum using given standard observer CIE XYZ colour matching functions. |
single_lightness_function_plot ([function]) |
Plots given Lightness function. |
multi_lightness_function_plot ([functions]) |
Plots given Lightness functions. |
blackbody_spectral_radiance_plot ([…]) |
Plots given blackbody spectral radiance. |
blackbody_colours_plot ([shape, cmfs]) |
Plots blackbody colours. |
colour.plotting
colour_checker_plot ([colour_checker]) |
Plots given colour checker. |
colour.plotting
corresponding_chromaticities_prediction_plot ([…]) |
Plots given chromatic adaptation model corresponding chromaticities prediction. |
colour.plotting
chromaticity_diagram_plot_CIE1931 ([cmfs, …]) |
Plots the CIE 1931 Chromaticity Diagram. |
chromaticity_diagram_plot_CIE1960UCS ([cmfs, …]) |
Plots the CIE 1960 UCS Chromaticity Diagram. |
chromaticity_diagram_plot_CIE1976UCS ([cmfs, …]) |
Plots the CIE 1976 UCS Chromaticity Diagram. |
spds_chromaticity_diagram_plot_CIE1931 (spds) |
Plots given spectral power distribution chromaticity coordinates into the CIE 1931 Chromaticity Diagram. |
spds_chromaticity_diagram_plot_CIE1960UCS (spds) |
Plots given spectral power distribution chromaticity coordinates into the CIE 1960 UCS Chromaticity Diagram. |
spds_chromaticity_diagram_plot_CIE1976UCS (spds) |
Plots given spectral power distribution chromaticity coordinates into the CIE 1976 UCS Chromaticity Diagram. |
colour.plotting
RGB_colourspaces_chromaticity_diagram_plot_CIE1931 ([…]) |
Plots given RGB colourspaces in CIE 1931 Chromaticity Diagram. |
RGB_colourspaces_chromaticity_diagram_plot_CIE1960UCS ([…]) |
Plots given RGB colourspaces in CIE 1960 UCS Chromaticity Diagram. |
RGB_colourspaces_chromaticity_diagram_plot_CIE1976UCS ([…]) |
Plots given RGB colourspaces in CIE 1976 UCS Chromaticity Diagram. |
RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1931 (RGB) |
Plots given RGB colourspace array in CIE 1931 Chromaticity Diagram. |
RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1960UCS (RGB) |
Plots given RGB colourspace array in CIE 1960 UCS Chromaticity Diagram. |
RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1976UCS (RGB) |
Plots given RGB colourspace array in CIE 1976 UCS Chromaticity Diagram. |
single_cctf_plot ([colourspace, decoding_cctf]) |
Plots given colourspace colour component transfer function. |
multi_cctf_plot ([colourspaces, decoding_cctf]) |
Plots given colourspaces colour component transfer functions. |
colour.plotting
single_munsell_value_function_plot ([function]) |
Plots given Lightness function. |
multi_munsell_value_function_plot ([functions]) |
Plots given Munsell value functions. |
colour.plotting
single_rayleigh_scattering_spd_plot ([…]) |
Plots a single Rayleigh scattering spectral power distribution. |
the_blue_sky_plot ([cmfs]) |
Plots the blue sky. |
colour.plotting
single_spd_colour_rendering_index_bars_plot (…) |
Plots the Colour Rendering Index (CRI) of given illuminant or light source spectral power distribution. |
multi_spd_colour_rendering_index_bars_plot (…) |
Plots the Colour Rendering Index (CRI) of given illuminants or light sources spectral power distributions. |
single_spd_colour_quality_scale_bars_plot (…) |
Plots the Colour Quality Scale (CQS) of given illuminant or light source spectral power distribution. |
multi_spd_colour_quality_scale_bars_plot (…) |
Plots the Colour Quality Scale (CQS) of given illuminants or light sources spectral power distributions. |
colour.plotting
RGB_colourspaces_gamuts_plot ([colourspaces, …]) |
Plots given RGB colourspaces gamuts in given reference colourspace. |
RGB_scatter_plot (RGB, colourspace[, …]) |
Plots given RGB colourspace array in a scatter plot. |
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
colour_rendering_index (spd_test[, …]) |
Returns the Colour Rendering Index (CRI) \(Q_a\) of given spectral power distribution. |
colour.quality
CRI_Specification |
Defines the Colour Rendering Index (CRI) colour quality specification. |
colour
colour_quality_scale (spd_test[, additional_data]) |
Returns the Colour Quality Scale (CQS) of given spectral power distribution. |
colour.quality
CQS_Specification |
Defines the Colour Quality Scale (CQS) colour quality specification. |
Reflectance Recovery¶
colour
XYZ_to_spectral (XYZ[, method]) |
Recovers the spectral power distribution of given CIE XYZ tristimulus values using given method. |
REFLECTANCE_RECOVERY_METHODS |
Supported reflectance recovery methods. |
colour.recovery
RGB_to_spectral_Smits1999 (RGB) |
Recovers the spectral power distribution of given RGB colourspace array using Smits (1999) method. |
SMITS_1999_SPDS |
Smits (1999) spectral power distributions. |
colour.recovery
XYZ_to_spectral_Meng2015 (XYZ[, cmfs, …]) |
Recovers the spectral power distribution of given CIE XYZ tristimulus values using Meng et alii (2015) method. |
Colour Temperature¶
Utilities¶
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. |
filter_kwargs (function, **kwargs) |
Filters keyword arguments incompatible with the given function signature. |
first_item (a) |
Return the first item of an iterable. |
colour.utilities
as_numeric (a[, type_]) |
Converts given \(a\) variable to numeric. |
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) |
Stacks arrays in sequence along the last axis (tail). |
tsplit (a) |
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. |
fill_nan (a[, method, default]) |
Fills given array NaNs according to given method. |
ndarray_write (*args, **kwds) |
A context manager setting given array writeable to perform an operation and then read-only. |
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. |
colour.utilities
message_box (message[, width, padding]) |
Prints a message inside a box. |
warning (*args, **kwargs) |
Issues a warning. |
filter_warnings ([state, colour_warnings_only]) |
Filters Colour and also optionally overall Python warnings. |
suppress_warnings (*args, **kwds) |
A context manager filtering Colour and also optionally overall Python warnings. |
numpy_print_options (*args, **kwds) |
A context manager implementing context changes to Numpy print behaviour. |
Ancillary Objects
colour.utilities
ColourWarning |
This is the base class of Colour warnings. |
Colour Volume¶
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. |
colour
is_within_mesh_volume (points, mesh[, tolerance]) |
Returns if given points are within given mesh volume using Delaunay triangulation. |
colour
is_within_pointer_gamut (XYZ[, tolerance]) |
Returns if given CIE XYZ tristimulus values are within Pointer’s Gamut 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. |
colour
is_within_visible_spectrum (XYZ[, cmfs, …]) |
Returns if given CIE XYZ tristimulus values are within visible spectrum volume / given colour matching functions volume. |
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: http://www.arri.com/?eID=registration&file_uid=8026. |
[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. |
[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, jun 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, nov 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. |
[Bou] | Paul Bourke. Intersection point of two line segments in 2 dimensions. URL: http://paulbourke.net/geometry/pointlineplane/. |
[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, jun 1987. URL: https://www.osapublishing.org/abstract.cfm?URI=josaa-4-6-1115, 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, oct 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/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. |
[Can] | Canon. EOS C300 Mark II - EOS C300 Mark II Input Transform Version 2.0 (for Cinema Gamut / BT.2020). URL: https://www.usa.canon.com/internet/portal/us/home/support/details/cameras/cinema-eos/eos-c300-mark-ii. |
[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. |
[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, dec 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. |
[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. |
[Cot] | Russell Cottrell. The Russell RGB working color space. URL: http://www.russellcottrell.com/photo/downloads/RussellRGB.icc. |
[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. Cone Fundamentals. URL: http://www.cvrl.org/cones.htm. |
[CVRd] | CVRL. Luminous efficiency. URL: http://www.cvrl.org/lumindex.htm. |
[CVRe] | CVRL. New CIE XYZ functions transformed from the CIE (2006) LMS functions. URL: http://cvrl.ioo.ucl.ac.uk/ciexyzpr.htm. |
[CVRf] | CVRL. Older CIE Standards. URL: http://cvrl.ioo.ucl.ac.uk/cie.htm. |
[CVRg] | CVRL. Stiles & Burch individual 10-deg colour matching data. URL: http://www.cvrl.org/stilesburch10_ind.htm. |
[CVRh] | 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, mar 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, mar 2010. URL: http://opticalengineering.spiedigitallibrary.org/article.aspx?doi=10.1117/1.3360335, doi:10.1117/1.3360335. |
[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. jan 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, aug 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, oct 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, feb 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. |
[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, oct 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. apr 1995. URL: http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=991324, doi:10.1117/12.206546. |
[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, sep 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, sep 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. |
[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, dec 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, feb 2002. URL: http://doi.wiley.com/10.1002/col.10005, doi:10.1002/col.10005. |
[LPLMartinezverdu07] | Changjun Li, Esther Perales, Ming Ronnier Luo, and Francisco Martínez-verdú. The Problem with CAT02 and Its Correction. 2007. URL: https://pdfs.semanticscholar.org/b5a9/0215ad9a1fb6b01f310b3d64305f7c9feb3a.pdf. |
[Lin03a] | Bruce Lindbloom. A Continuity Study of the CIE L* Function. 2003. URL: http://brucelindbloom.com/LContinuity.html. |
[Lin03b] | Bruce Lindbloom. Delta E (CIE 1976). 2003. URL: http://brucelindbloom.com/Eqn_DeltaE_CIE76.html. |
[Lin03c] | Bruce Lindbloom. XYZ to xyY. 2003. URL: http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html. |
[Lin07] | Bruce Lindbloom. Spectral Power Distribution of a CIE D-Illuminant. 2007. URL: http://www.brucelindbloom.com/Eqn_DIlluminant.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. |
[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, aug 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, dec 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, nov 1935. URL: http://www.opticsinfobase.org/abstract.cfm?URI=josa-25-11-361, doi:10.1364/JOSA.25.000361. |
[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. |
[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: http://colour-science.org/posts/red-colourspaces-derivation. |
[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, jul 2015. URL: http://doi.wiley.com/10.1111/cgf.12676, doi:10.1111/cgf.12676. |
[MDolbyLaboratories14] | Scott Miller and Dolby Laboratories. 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. |
[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, jun 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, jul 1943. URL: https://www.osapublishing.org/abstract.cfm?URI=josa-33-7-385, doi:10.1364/JOSA.33.000385. |
[Ohn14] | Yoshiro Ohno. Practical Use and Calculation of CCT and Duv. LEUKOS, 10(1):47–55, jan 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. |
[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, feb 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. |
[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, jan 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, aug 1988. URL: http://doi.wiley.com/10.1002/col.5080130410, doi:10.1002/col.5080130410. |
[SBS99] | Sabine Susstrunk, Robert Buckley, and Steve Swen. Standard RGB Color Spaces. 1999. |
[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. |
[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. |
[Wika] | Wikipedia. Approximation. URL: http://en.wikipedia.org/wiki/Color_temperature#Approximation. |
[Wikb] | Wikipedia. CAT02. URL: http://en.wikipedia.org/wiki/CIECAM02#CAT02. |
[Wikc] | Wikipedia. CIE 1931 color space. URL: http://en.wikipedia.org/wiki/CIE_1931_color_space. |
[Wikd] | Wikipedia. CIE 1960 color space. URL: http://en.wikipedia.org/wiki/CIE_1960_color_space. |
[Wike] | Wikipedia. CIE 1964 color space. URL: http://en.wikipedia.org/wiki/CIE_1964_color_space. |
[Wikf] | Wikipedia. CIECAM02. URL: http://en.wikipedia.org/wiki/CIECAM02. |
[Wikg] | Wikipedia. CIELUV. URL: http://en.wikipedia.org/wiki/CIELUV. |
[Wikh] | Wikipedia. Color difference. URL: http://en.wikipedia.org/wiki/Color_difference. |
[Wiki] | Wikipedia. Color temperature. URL: http://en.wikipedia.org/wiki/Color_temperature. |
[Wikj] | Wikipedia. HSL and HSV. URL: http://en.wikipedia.org/wiki/HSL_and_HSV. |
[Wikk] | Wikipedia. ISO 31-11. URL: https://en.wikipedia.org/wiki/ISO_31-11. |
[Wikl] | Wikipedia. Lagrange polynomial - Definition. URL: https://en.wikipedia.org/wiki/Lagrange_polynomial#Definition. |
[Wikm] | Wikipedia. Lanczos resampling. URL: https://en.wikipedia.org/wiki/Lanczos_resampling. |
[Wikn] | Wikipedia. Lightness. URL: http://en.wikipedia.org/wiki/Lightness. |
[Wiko] | Wikipedia. List of common coordinate transformations. URL: http://en.wikipedia.org/wiki/List_of_common_coordinate_transformations. |
[Wikp] | Wikipedia. Luminance. URL: https://en.wikipedia.org/wiki/Luminance. |
[Wikq] | Wikipedia. Luminosity function. URL: https://en.wikipedia.org/wiki/Luminosity_function#Details. |
[Wikr] | Wikipedia. Luminous Efficacy. URL: https://en.wikipedia.org/wiki/Luminous_efficacy. |
[Wiks] | Wikipedia. Mesopic weighting function. URL: http://en.wikipedia.org/wiki/Mesopic_vision#Mesopic_weighting_function. |
[Wikt] | Wikipedia. Michaelis–Menten kinetics. URL: https://en.wikipedia.org/wiki/Michaelis–Menten_kinetics. |
[Wiku] | Wikipedia. Rayleigh scattering. URL: http://en.wikipedia.org/wiki/Rayleigh_scattering. |
[Wikv] | Wikipedia. Relation to CIE XYZ. URL: http://en.wikipedia.org/wiki/CIE_1960_color_space#Relation_to_CIE_XYZ. |
[Wikw] | Wikipedia. Surfaces. URL: http://en.wikipedia.org/wiki/Gamut#Surfaces. |
[Wikx] | Wikipedia. The reverse transformation. URL: http://en.wikipedia.org/wiki/CIELUV#The_reverse_transformation. |
[Wiky] | Wikipedia. White points of standard illuminants. URL: http://en.wikipedia.org/wiki/Standard_illuminant#White_points_of_standard_illuminants. |
[Wikz] | Wikipedia. Whiteness. URL: http://en.wikipedia.org/wiki/Whiteness. |
[Wik{] | Wikipedia. Wide-gamut RGB color space. URL: http://en.wikipedia.org/wiki/Wide-gamut_RGB_color_space. |
[Wik|] | Wikipedia. YCbCr. URL: https://en.wikipedia.org/wiki/YCbCr. |
[Wys63] | Günter Wyszecki. Proposal for a New Color-Difference Formula. Journal of the Optical Society of America, 53(11):1318, nov 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. CIE 1976 (L*u*v*)-Space and Color-Difference Formula. In Color Science: Concepts and Methods, Quantitative Data and Formulae, pages 167. Wiley, 2000. |
[WS00b] | 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. |
[WS00c] | 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. |
[WS00d] | 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. |
[WS00e] | 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. |
[WS00f] | 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. |
[WS00g] | 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. |
[WS00h] | 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. |
[WS00i] | 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. |
[WS00j] | 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. |
[WS00k] | 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. |
[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. |
[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. |
[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. 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. |
[CIET14804h] | 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. |
[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. |
[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. |
[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, jan 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, jan 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. |
Indirect References¶
Some extra references used in the codebase but not directly part of the public api:
Examples¶
Chromatic Adaptation
>>> import colour
>>> XYZ = [0.07049534, 0.10080000, 0.09558313]
>>> A = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['A']
>>> D65 = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65']
>>> colour.chromatic_adaptation(
... XYZ, colour.xy_to_XYZ(A), colour.xy_to_XYZ(D65))
array([ 0.08398225, 0.11413379, 0.28629643])
>>> sorted(colour.CHROMATIC_ADAPTATION_METHODS.keys())
['CIE 1994', 'CMCCAT2000', 'Fairchild 1990', 'Von Kries']
Algebra
>>> import colour
>>> 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])
>>> colour.SpragueInterpolator(x, y)([0.25, 0.75, 5.50])
array([ 6.72951612, 7.81406251, 43.77379185])
Spectral Computations
>>> import colour
>>> colour.spectral_to_XYZ(colour.LIGHT_SOURCES_RELATIVE_SPDS['Neodimium Incandescent'])
array([ 36.94726204, 32.62076174, 13.0143849 ])
>>> sorted(colour.SPECTRAL_TO_XYZ_METHODS.keys())
[u'ASTM E308-15', u'Integration', u'astm2015']
Blackbody Spectral Radiance Computation
>>> import colour
>>> colour.blackbody_spd(5000)
SpectralPowerDistribution([[ 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={u'right': None, u'method': u'Constant', u'left': None})
Dominant, Complementary Wavelength & Colour Purity Computation
>>> import colour
>>> xy = [0.26415, 0.37770]
>>> xy_n = [0.31270, 0.32900]
>>> colour.dominant_wavelength(xy, xy_n)
(array(504.0),
array([ 0.00369694, 0.63895775]),
array([ 0.00369694, 0.63895775]))
Lightness Computation
>>> import colour
>>> colour.lightness(10.08)
24.902290269546651
>>> sorted(colour.LIGHTNESS_METHODS.keys())
[u'CIE 1976',
u'Fairchild 2010',
u'Glasser 1958',
u'Lstar1976',
u'Wyszecki 1963']
Luminance Computation
>>> import colour
>>> colour.luminance(37.98562910)
10.080000001314646
>>> sorted(colour.LUMINANCE_METHODS.keys())
[u'ASTM D1535-08',
u'CIE 1976',
u'Fairchild 2010',
u'Newhall 1943',
u'astm2008',
u'cie1976']
Whiteness Computation
>>> import colour
>>> 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())
[u'ASTM E313',
u'Berger 1959',
u'CIE 2004',
u'Ganz 1979',
u'Stensby 1968',
u'Taube 1960',
u'cie2004']
Yellowness Computation
>>> import colour
>>> XYZ = [95.00000000, 100.00000000, 105.00000000]
>>> colour.yellowness(XYZ)
11.065000000000003
>>> sorted(colour.YELLOWNESS_METHODS.keys())
[u'ASTM D1925', u'ASTM E313']
Luminous Flux, Efficiency & Efficacy Computation
>>> import colour
>>> spd = colour.LIGHT_SOURCES_RELATIVE_SPDS['Neodimium Incandescent']
>>> colour.luminous_flux(spd)
3807.655527367202
>>> colour.luminous_efficiency(spd)
0.19943935624521045
>>> colour.luminous_efficiency(spd)
136.21708031547874
Colour Models
>>> import colour
>>> XYZ = [0.07049534, 0.10080000, 0.09558313]
>>> colour.XYZ_to_Lab(XYZ)
array([ 37.9856291 , -23.62907688, -4.41746615])
>>> colour.XYZ_to_Luv(XYZ)
array([ 37.9856291 , -28.80219593, -1.35800706])
>>> colour.XYZ_to_UCS(XYZ)
array([ 0.04699689, 0.1008 , 0.1637439 ])
>>> colour.XYZ_to_UVW(XYZ)
array([ 4.0680797 , 0.12787175, -5.36516614])
>>> colour.XYZ_to_xyY(XYZ)
array([ 0.26414772, 0.37770001, 0.1008 ])
>>> colour.XYZ_to_hdr_CIELab(XYZ)
array([ 24.90206646, -46.83127607, -10.14274843])
>>> colour.XYZ_to_hdr_IPT(XYZ)
array([ 25.18261761, -22.62111297, 3.18511729])
>>> colour.XYZ_to_Hunter_Lab([7.049534, 10.080000, 9.558313])
array([ 31.74901573, -15.11462629, -2.78660758])
>>> colour.XYZ_to_Hunter_Rdab([7.049534, 10.080000, 9.558313])
array([ 10.08 , -18.67653764, -3.44329925])
>>> colour.XYZ_to_IPT(XYZ)
array([ 0.36571124, -0.11114798, 0.01594746])
>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_w = np.array([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([ 54.90433134, -0.08442362, -0.06848314])
>>> 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([ 54.89102616, -9.42910274, -5.52845976])
>>> XYZ = [0.07049534, 0.10080000, 0.09558313]
>>> 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.01100154, 0.12735048, 0.11632713])
>>> colour.RGB_to_ICTCP([0.35181454, 0.26934757, 0.21288023])
array([ 0.09554079, -0.00890639, 0.01389286])
>>> colour.RGB_to_HSV([0.49019608, 0.98039216, 0.25098039])
array([ 0.27867383, 0.744 , 0.98039216])
>>> 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]])
>>> colour.RGB_to_Prismatic([0.25, 0.50, 0.75])
array([ 0.75 , 0.16666667, 0.33333333, 0.5 ])
>>> colour.RGB_to_YCbCr([1.0, 1.0, 1.0])
array([ 0.92156863, 0.50196078, 0.50196078])
RGB Colourspaces
>>> import colour
>>> sorted(colour.RGB_COLOURSPACES.keys())
[u'ACES2065-1',
u'ACEScc',
u'ACEScct',
u'ACEScg',
u'ACESproxy',
u'ALEXA Wide Gamut',
u'Adobe RGB (1998)',
u'Adobe Wide Gamut RGB',
u'Apple RGB',
u'Best RGB',
u'Beta RGB',
u'CIE RGB',
u'Cinema Gamut',
u'ColorMatch RGB',
u'DCI-P3',
u'DCI-P3+',
u'DRAGONcolor',
u'DRAGONcolor2',
u'Don RGB 4',
u'ECI RGB v2',
u'ERIMM RGB',
u'Ekta Space PS 5',
u'ITU-R BT.2020',
u'ITU-R BT.470 - 525',
u'ITU-R BT.470 - 625',
u'ITU-R BT.709',
u'Max RGB',
u'NTSC',
u'Pal/Secam',
u'ProPhoto RGB',
u'Protune Native',
u'REDWideGamutRGB',
u'REDcolor',
u'REDcolor2',
u'REDcolor3',
u'REDcolor4',
u'RIMM RGB',
u'ROMM RGB',
u'Russell RGB',
u'S-Gamut',
u'S-Gamut3',
u'S-Gamut3.Cine',
u'SMPTE 240M',
u'V-Gamut',
u'Xtreme RGB',
'aces',
'adobe1998',
'prophoto',
u'sRGB']
OETFs
>>> import colour
>>> sorted(colour.OETFS.keys())
['ARIB STD-B67',
'DCI-P3',
'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']
EOTFs
>>> import colour
>>> sorted(colour.EOTFS.keys())
['DCI-P3',
'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']
OOTFs
>>> import colour
>>> sorted(colour.OOTFS.keys())
['ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ']
Log Encoding / Decoding Curves
>>> import colour
>>> sorted(colour.LOG_ENCODING_CURVES.keys())
['ACEScc',
'ACEScct',
'ACESproxy',
'ALEXA Log C',
'Canon Log',
'Canon Log 2',
'Canon Log 3',
'Cineon',
'ERIMM RGB',
'Log3G10',
'Log3G12',
'PLog',
'Panalog',
'Protune',
'REDLog',
'REDLogFilm',
'S-Log',
'S-Log2',
'S-Log3',
'V-Log',
'ViperLog']
Chromatic Adaptation Models
>>> import colour
>>> XYZ = [0.07049534, 0.10080000, 0.09558313]
>>> XYZ_w = [1.09846607, 1.00000000, 0.35582280]
>>> XYZ_wr = [0.95042855, 1.00000000, 1.08890037]
>>> colour.chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr)
array([ 0.08397461, 0.11413219, 0.28625545])
Colour Appearance Models
>>> import colour
>>> XYZ = [19.01, 20.00, 21.78]
>>> 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=41.731091132513917, C=0.10470775717103062, h=219.04843265831178, s=2.3603053739196032, Q=195.37132596607671, M=0.10884217566914849, H=278.06073585667758, HC=None)
Colour Difference
>>> import colour
>>> 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',
'cie1976',
'cie1994',
'cie2000']
Colour Notation Systems
>>> import colour
>>> colour.munsell_value(10.1488096782)
3.7462971142584354
>>> sorted(colour.MUNSELL_VALUE_METHODS.keys())
[u'ASTM D1535-08',
u'Ladd 1955',
u'McCamy 1987',
u'Moon 1943',
u'Munsell 1933',
u'Priest 1920',
u'Saunderson 1944',
u'astm2008']
>>> colour.xyY_to_munsell_colour([0.38736945, 0.35751656, 0.59362000])
u'4.2YR 8.1/5.3'
>>> colour.munsell_colour_to_xyY('4.2YR 8.1/5.3')
array([ 0.38736945, 0.35751656, 0.59362 ])
Optical Phenomena
>>> import colour
>>> colour.rayleigh_scattering_spd()
SpectralPowerDistribution([[ 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={u'right': None, u'method': u'Constant', u'left': None})
Light Quality
>>> import colour
>>> colour.colour_quality_scale(colour.ILLUMINANTS_RELATIVE_SPDS['F2'])
64.686416902221609
>>> colour.colour_rendering_index(colour.ILLUMINANTS_RELATIVE_SPDS['F2'])
64.151520202968015
Reflectance Recovery
>>> import colour
>>> colour.XYZ_to_spectral([0.07049534, 0.10080000, 0.09558313])
SpectralPowerDistribution([[ 3.60000000e+02, 7.96361498e-04],
[ 3.65000000e+02, 7.96489667e-04],
[ 3.70000000e+02, 7.96543669e-04],
...
[ 8.20000000e+02, 1.71014294e-04],
[ 8.25000000e+02, 1.71621924e-04],
[ 8.30000000e+02, 1.72026883e-04]],
interpolator=SpragueInterpolator,
interpolator_args={},
extrapolator=Extrapolator,
extrapolator_args={u'right': None, u'method': u'Constant', u'left': None})
>>> sorted(colour.REFLECTANCE_RECOVERY_METHODS.keys())
['Meng 2015', 'Smits 1999']
Correlated Colour Temperature Computation Methods
>>> import colour
>>> colour.uv_to_CCT([0.1978, 0.3122])
array([ 6.50751282e+03, 3.22335875e-03])
>>> sorted(colour.UV_TO_CCT_METHODS.keys())
[u'Ohno 2013', u'Robertson 1968', u'ohno2013', u'robertson1968']
>>> sorted(colour.UV_TO_CCT_METHODS.keys())
[u'Krystek 1985',
u'Ohno 2013',
u'Robertson 1968',
u'ohno2013',
u'robertson1968']
>>> sorted(colour.XY_TO_CCT_METHODS.keys())
[u'Hernandez 1999', u'McCamy 1992', u'hernandez1999', u'mccamy1992']
>>> sorted(colour.CCT_TO_XY_METHODS.keys())
[u'CIE Illuminant D Series', u'Kang 2002', su'cie_d', u'kang2002']
Volume
>>> import colour
>>> colour.RGB_colourspace_volume_MonteCarlo(colour.sRGB_COLOURSPACE)
857011.5
Contributing¶
If you would like to contribute to Colour, please refer to the following Contributing guide.
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
- ColorPy by Kness, M.
- Colorspacious by Smith, N. J., et al.
- python-colormath by Taylor, G., et al.
.NET
- Colourful by Pažourek, T., et al.
Julia
- Colors.jl by Holy, T., et al.
Matlab & Octave
- COLORLAB by Malo, J., et al.
- Psychtoolbox by Brainard, D., et al.
- The Munsell and Kubelka-Munk Toolbox by Centore, P.