colour.plotting.colorimetry Module¶
Colorimetry Plotting¶
Defines the colorimetry plotting objects:
single_spd_plot()
multi_spd_plot()
single_cmfs_plot()
multi_cmfs_plot()
single_illuminant_relative_spd_plot()
multi_illuminants_relative_spd_plot()
visible_spectrum_plot()
single_lightness_function_plot()
multi_lightness_function_plot()
blackbody_spectral_radiance_plot()
blackbody_colours_plot()
References
[1] | (1, 2) Spiker, N. (2015). Private Discussion with Mansencal, T. Retrieved from http://www.repairfaq.org/sam/repspec/ |
-
colour.plotting.colorimetry.
single_spd_plot
(spd, cmfs='CIE 1931 2 Degree Standard Observer', out_of_gamut_clipping=True, **kwargs)[source]¶ Plots given spectral power distribution.
Parameters: - spd (SpectralPowerDistribution) – Spectral power distribution to plot.
- out_of_gamut_clipping (bool, optional) – Out of gamut colours will be clipped if True otherwise, the colours will be offset by the absolute minimal colour leading to a rendering on gray background, less saturated and smoother. [1]
- cmfs (unicode) – Standard observer colour matching functions used for spectrum creation.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> from colour import SpectralPowerDistribution >>> data = {400: 0.0641, 420: 0.0645, 440: 0.0562} >>> spd = SpectralPowerDistribution('Custom', data) >>> single_spd_plot(spd) True
-
colour.plotting.colorimetry.
multi_spd_plot
(spds, cmfs='CIE 1931 2 Degree Standard Observer', use_spds_colours=False, normalise_spds_colours=False, **kwargs)[source]¶ Plots given spectral power distributions.
Parameters: - spds (list) – Spectral power distributions to plot.
- cmfs (unicode, optional) – Standard observer colour matching functions used for spectrum creation.
- use_spds_colours (bool, optional) – Use spectral power distributions colours.
- normalise_spds_colours (bool) – Should spectral power distributions colours normalised.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> from colour import SpectralPowerDistribution >>> data1 = {400: 0.0641, 420: 0.0645, 440: 0.0562} >>> data2 = {400: 0.134, 420: 0.789, 440: 1.289} >>> spd1 = SpectralPowerDistribution('Custom1', data1) >>> spd2 = SpectralPowerDistribution('Custom2', data2) >>> multi_spd_plot([spd1, spd2]) True
-
colour.plotting.colorimetry.
single_cmfs_plot
(cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]¶ Plots given colour matching functions.
Parameters: - cmfs (unicode, optional) – Colour matching functions to plot.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> single_cmfs_plot() True
-
colour.plotting.colorimetry.
multi_cmfs_plot
(cmfs=None, **kwargs)[source]¶ Plots given colour matching functions.
Parameters: - cmfs (array_like, optional) – Colour matching functions to plot.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> cmfs = [ ... 'CIE 1931 2 Degree Standard Observer', ... 'CIE 1964 10 Degree Standard Observer'] >>> multi_cmfs_plot(cmfs) True
-
colour.plotting.colorimetry.
single_illuminant_relative_spd_plot
(illuminant='A', cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]¶ Plots given single illuminant relative spectral power distribution.
Parameters: - illuminant (unicode, optional) – Factory illuminant to plot.
- cmfs (unicode, optional) – Standard observer colour matching functions to plot.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> single_illuminant_relative_spd_plot() True
-
colour.plotting.colorimetry.
multi_illuminants_relative_spd_plot
(illuminants=None, **kwargs)[source]¶ Plots given illuminants relative spectral power distributions.
Parameters: - illuminants (array_like, optional) – Factory illuminants to plot.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> multi_illuminants_relative_spd_plot(['A', 'B', 'C']) True
-
colour.plotting.colorimetry.
visible_spectrum_plot
(cmfs='CIE 1931 2 Degree Standard Observer', out_of_gamut_clipping=True, **kwargs)[source]¶ Plots the visible colours spectrum using given standard observer CIE XYZ colour matching functions.
Parameters: - cmfs (unicode, optional) – Standard observer colour matching functions used for spectrum creation.
- out_of_gamut_clipping (bool, optional) – Out of gamut colours will be clipped if True otherwise, the colours will be offset by the absolute minimal colour leading to a rendering on gray background, less saturated and smoother. [1]
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> visible_spectrum_plot() True
-
colour.plotting.colorimetry.
single_lightness_function_plot
(function='CIE 1976', **kwargs)[source]¶ Plots given Lightness function.
Parameters: - function (unicode, optional) – Lightness function to plot.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> single_lightness_function_plot() True
-
colour.plotting.colorimetry.
multi_lightness_function_plot
(functions=None, **kwargs)[source]¶ Plots given Lightness functions.
Parameters: - functions (array_like, optional) – Lightness functions to plot.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Raises: KeyError
– If one of the given Lightness function is not found in the factory Lightness functions.Examples
>>> fs = ('CIE 1976', 'Wyszecki 1963') >>> multi_lightness_function_plot(fs) True
-
colour.plotting.colorimetry.
blackbody_spectral_radiance_plot
(temperature=3500, cmfs='CIE 1931 2 Degree Standard Observer', blackbody='VY Canis Major', **kwargs)[source]¶ Plots given blackbody spectral radiance.
Parameters: - temperature (numeric, optional) – Blackbody temperature.
- cmfs (unicode, optional) – Standard observer colour matching functions.
- blackbody (unicode, optional) – Blackbody name.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> blackbody_spectral_radiance_plot() True
-
colour.plotting.colorimetry.
blackbody_colours_plot
(shape=SpectralShape(150.0, 12500.0, 50.0), cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]¶ Plots blackbody colours.
Parameters: - shape (SpectralShape, optional) – Spectral shape to use as plot boundaries.
- cmfs (unicode, optional) – Standard observer colour matching functions.
- **kwargs (dict, optional) – Keywords arguments.
Returns: Definition success.
Return type: Examples
>>> blackbody_colours_plot() True