Bases: tuple
ColourParameter(name, RGB, x, y0, y1)
Alias for field number 1
Return self as a plain tuple. Used by copy and pickle.
Exclude the OrderedDict from pickling
Return a nicely formatted representation string
Alias for field number 0
Alias for field number 2
Alias for field number 3
Alias for field number 4
Returns a colour cycle iterator using given colour map.
Keywords arguments.Colour cycle iterator.
Sets the figure size and aspect.
Parameters: | **kwargs (**) – Keywords arguments. |
---|---|
Returns: | Current figure. |
Return type: | Figure |
Sets the figure decorations.
Parameters: | **kwargs (**) – Keywords arguments. |
---|---|
Returns: | Definition success. |
Return type: | bool |
Sets the plot boundaries.
Parameters: | **kwargs (**) – Keywords arguments. |
---|---|
Returns: | Definition success. |
Return type: | bool |
Sets the figure display.
Parameters: | **kwargs (**) – Keywords arguments. |
---|---|
Returns: | Definition success. |
Return type: | bool |
Defines a factory for colour.plotting.plots.COLOUR_PARAMETER attribute.
Parameters: |
|
---|---|
Returns: | ColourParameter. |
Return type: | ColourParameter |
Plots given colour colour_parameters.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> cp1 = colour_parameter(x=390, RGB=[0.03009021, 0, 0.12300545])
>>> cp2 = colour_parameter(x=391, RGB=[0.03434063, 0, 0.13328537], y0=0, y1=0.25)
>>> cp3 = colour_parameter(x=392, RGB=[0.03826312, 0, 0.14276247], y0=0, y1=0.35)
>>> cp4 = colour_parameter(x=393, RGB=[0.04191844, 0, 0.15158707], y0=0, y1=0.05)
>>> cp5 = colour_parameter(x=394, RGB=[0.04535085, 0, 0.15986838], y0=0, y1=-.25)
>>> colour_parameters_plot([cp1, cp2, cp3, cp3, cp4, cp5])
True
Plots given colour.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> RGB = (0.32315746, 0.32983556, 0.33640183)
>>> single_colour_plot(colour_parameter(RGB))
True
Plots given colours.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> cp1 = colour_parameter(RGB=(0.45293517, 0.31732158, 0.26414773))
>>> cp2 = colour_parameter(RGB=(0.77875824, 0.57726450, 0.50453169))
>>> multi_colour_plot([cp1, cp2])
True
Plots given image.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> import os
>>> from colour import read_image
>>> path = os.path.join('resources', 'CIE_1931_Chromaticity_Diagram_CIE_1931_2_Degree_Standard_Observer.png')
>>> image = read_image(path)
>>> image_plot(image)
True
Returns the colour matching functions with given name.
Parameters: | cmfs (unicode) – Colour matching functions name. |
---|---|
Returns: | Colour matching functions. |
Return type: | RGB_ColourMatchingFunctions or XYZ_ColourMatchingFunctions |
Raises: | KeyError – If the given colour matching functions is not found in the factory colour matching functions. |
Returns the illuminant with given name.
Parameters: | illuminant (unicode) – Illuminant name. |
---|---|
Returns: | Illuminant. |
Return type: | SpectralPowerDistribution |
Raises: | KeyError – If the given illuminant is not found in the factory illuminants. |
Plots given spectral power distribution.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> from colour import SpectralPowerDistribution
>>> data = {400: 0.0641, 420: 0.0645, 440: 0.0562}
>>> spd = SpectralPowerDistribution('Custom', data)
>>> single_spd_plot(spd)
True
Plots given spectral power distributions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
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
Plots given colour matching functions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> single_cmfs_plot()
True
Plots given colour matching functions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> cmfs = [
... 'CIE 1931 2 Degree Standard Observer',
... 'CIE 1964 10 Degree Standard Observer']
>>> multi_cmfs_plot(cmfs)
True
Plots given single illuminant relative spectral power distribution.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> single_illuminant_relative_spd_plot()
True
Plots given illuminants relative spectral power distributions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> multi_illuminants_relative_spd_plot(['A', 'B', 'C'])
True
Plots the visible colours spectrum using given standard observer CIE XYZ colour matching functions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> visible_spectrum_plot()
True
Plots given Lightness function.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> single_lightness_function_plot()
True
Plots given Lightness functions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
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
Plots given blackbody spectral radiance.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> blackbody_spectral_radiance_plot()
True
Plots blackbody colours.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> blackbody_colours_plot()
True
Plots given colour checker.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Raises: | KeyError – If the given colour rendition chart is not found in the factory colour rendition charts. |
Examples
>>> colour_checker_plot()
True
Plots the CIE 1931 Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> CIE_1931_chromaticity_diagram_plot()
True
Plots the CIE 1960 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> CIE_1960_UCS_chromaticity_diagram_plot()
True
Plots the CIE 1976 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> CIE_1976_UCS_chromaticity_diagram_plot()
True
Plots given spectral power distribution chromaticity coordinates into the CIE 1931 Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> A = ILLUMINANTS_RELATIVE_SPDS['A']
>>> D65 = ILLUMINANTS_RELATIVE_SPDS['D65']
>>> spds_CIE_1931_chromaticity_diagram_plot([A, D65])
True
Plots given spectral power distribution chromaticity coordinates into the CIE 1960 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> A = ILLUMINANTS_RELATIVE_SPDS['A']
>>> D65 = ILLUMINANTS_RELATIVE_SPDS['D65']
>>> spds_CIE_1960_UCS_chromaticity_diagram_plot([A, D65])
True
Plots given spectral power distribution chromaticity coordinates into the CIE 1976 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> A = ILLUMINANTS_RELATIVE_SPDS['A']
>>> D65 = ILLUMINANTS_RELATIVE_SPDS['D65']
>>> spds_CIE_1976_UCS_chromaticity_diagram_plot([A, D65])
True
Plots given chromatic adaptation model corresponding chromaticities prediction.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> corresponding_chromaticities_prediction_plot()
True
Returns the RGB colourspace with given name.
Parameters: | colourspace (unicode) – RGB colourspace name. |
---|---|
Returns: | RGB colourspace. |
Return type: | RGB_Colourspace |
Raises: | KeyError – If the given RGB colourspace is not found in the factory RGB colourspaces. |
Plots given RGB colourspaces in CIE 1931 Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> csps = ['sRGB', 'ACES2065-1']
>>> RGB_colourspaces_CIE_1931_chromaticity_diagram_plot(csps)
True
Plots given RGB colourspaces in CIE 1960 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> csps = ['sRGB', 'ACES2065-1']
>>> RGB_colourspaces_CIE_1960_UCS_chromaticity_diagram_plot(csps)
True
Plots given RGB colourspaces in CIE 1976 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> csps = ['sRGB', 'ACES2065-1']
>>> RGB_colourspaces_CIE_1976_UCS_chromaticity_diagram_plot(csps)
True
Plots given RGB colourspace array in CIE 1931 Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> RGB = np.random.random((10, 10, 3))
>>> RGB_chromaticity_coordinates_CIE_1931_chromaticity_diagram_plot(RGB)
True
Plots given RGB colourspace array in CIE 1960 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> RGB = np.random.random((10, 10, 3))
>>> RGB_chromaticity_coordinates_CIE_1960_UCS_chromaticity_diagram_plot(RGB)
True
Plots given RGB colourspace array in CIE 1976 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> RGB = np.random.random((10, 10, 3))
>>> RGB_chromaticity_coordinates_CIE_1976_UCS_chromaticity_diagram_plot(RGB)
True
Plots given colourspace transfer function.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> single_transfer_function_plot()
True
Plots given colourspaces transfer functions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> multi_transfer_function_plot(['sRGB', 'Rec. 709'])
True
Plots given Lightness function.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> f = 'ASTM D1535-08'
>>> single_munsell_value_function_plot(f)
True
Plots given Munsell value functions.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Raises: | KeyError – If one of the given Munsell value function is not found in the factory Munsell value functions. |
Examples
>>> fs = ('ASTM D1535-08', 'McCamy 1987')
>>> multi_munsell_value_function_plot(fs)
True
Plots a single rayleigh scattering spectral power distribution.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> single_rayleigh_scattering_spd_plot()
True
Plots the blue sky.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> the_blue_sky_plot()
True
Plots the colour quality scale of given illuminant or light source.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> illuminant = ILLUMINANTS_RELATIVE_SPDS.get('F2')
>>> colour_quality_scale_bars_plot(illuminant)
True
Plots the colour rendering index of given illuminant or light source.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> from colour import ILLUMINANTS_RELATIVE_SPDS
>>> illuminant = ILLUMINANTS_RELATIVE_SPDS.get('F2')
>>> colour_rendering_index_bars_plot(illuminant)
True
Plots the planckian locus and given illuminants in CIE 1931 Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Raises: | KeyError – If one of the given illuminant is not found in the factory illuminants. |
Examples
>>> ils = ['A', 'B', 'C']
>>> planckian_locus_CIE_1931_chromaticity_diagram_plot(ils)
True
Plots the planckian locus and given illuminants in CIE 1960 UCS Chromaticity Diagram.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Raises: | KeyError – If one of the given illuminant is not found in the factory illuminants. |
Examples
>>> ils = ['A', 'C', 'E']
>>> planckian_locus_CIE_1960_UCS_chromaticity_diagram_plot(ils)
True