colour.plotting.models Module

Colour Models Plotting

Defines the colour models plotting objects:

colour.plotting.models.get_RGB_colourspace(colourspace)[source]

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.
colour.plotting.models.RGB_colourspaces_CIE_1931_chromaticity_diagram_plot(colourspaces=None, cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]

Plots given RGB colourspaces in CIE 1931 Chromaticity Diagram.

Parameters:
  • colourspaces (list, optional) – RGB colourspaces to plot.
  • cmfs (unicode, optional) – Standard observer colour matching functions used for diagram bounds.
  • **kwargs (**) – Keywords arguments.
Returns:

Definition success.

Return type:

bool

Examples

>>> csps = ['sRGB', 'ACES2065-1']
>>> RGB_colourspaces_CIE_1931_chromaticity_diagram_plot(csps)    
True
colour.plotting.models.RGB_colourspaces_CIE_1960_UCS_chromaticity_diagram_plot(colourspaces=None, cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]

Plots given RGB colourspaces in CIE 1960 UCS Chromaticity Diagram.

Parameters:
  • colourspaces (list, optional) – RGB colourspaces to plot.
  • cmfs (unicode, optional) – Standard observer colour matching functions used for diagram bounds.
  • **kwargs (**) – Keywords arguments.
Returns:

Definition success.

Return type:

bool

Examples

>>> csps = ['sRGB', 'ACES2065-1']
>>> RGB_colourspaces_CIE_1960_UCS_chromaticity_diagram_plot(csps)    
True
colour.plotting.models.RGB_colourspaces_CIE_1976_UCS_chromaticity_diagram_plot(colourspaces=None, cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]

Plots given RGB colourspaces in CIE 1976 UCS Chromaticity Diagram.

Parameters:
  • colourspaces (list, optional) – RGB colourspaces to plot.
  • cmfs (unicode, optional) – Standard observer colour matching functions used for diagram bounds.
  • **kwargs (**) – Keywords arguments.
Returns:

Definition success.

Return type:

bool

Examples

>>> csps = ['sRGB', 'ACES2065-1']
>>> RGB_colourspaces_CIE_1976_UCS_chromaticity_diagram_plot(csps)    
True
colour.plotting.models.RGB_chromaticity_coordinates_CIE_1931_chromaticity_diagram_plot(RGB, colourspace, **kwargs)[source]

Plots given RGB colourspace array in CIE 1931 Chromaticity Diagram.

Parameters:
  • RGB (array_like) – RGB colourspace array.
  • colourspace (RGB_Colourspace) – RGB colourspace of the RGB array.
  • **kwargs (**) – Keywords arguments.
Returns:

Definition success.

Return type:

bool

Examples

>>> RGB = np.random.random((10, 10, 3))
>>> RGB_chromaticity_coordinates_CIE_1931_chromaticity_diagram_plot(RGB)    
True
colour.plotting.models.RGB_chromaticity_coordinates_CIE_1960_UCS_chromaticity_diagram_plot(RGB, colourspace, **kwargs)[source]

Plots given RGB colourspace array in CIE 1960 UCS Chromaticity Diagram.

Parameters:
  • RGB (array_like) – RGB colourspace array.
  • colourspace (RGB_Colourspace) – RGB colourspace of the RGB array.
  • **kwargs (**) – Keywords arguments.
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
colour.plotting.models.RGB_chromaticity_coordinates_CIE_1976_UCS_chromaticity_diagram_plot(RGB, colourspace, **kwargs)[source]

Plots given RGB colourspace array in CIE 1976 UCS Chromaticity Diagram.

Parameters:
  • RGB (array_like) – RGB colourspace array.
  • colourspace (RGB_Colourspace) – RGB colourspace of the RGB array.
  • **kwargs (**) – Keywords arguments.
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
colour.plotting.models.single_transfer_function_plot(colourspace='sRGB', **kwargs)[source]

Plots given colourspace transfer function.

Parameters:
  • colourspace (unicode, optional) – RGB Colourspace transfer function to plot.
  • **kwargs (**) – Keywords arguments.
Returns:

Definition success.

Return type:

bool

Examples

>>> single_transfer_function_plot()  
True
colour.plotting.models.multi_transfer_function_plot(colourspaces=None, inverse=False, **kwargs)[source]

Plots given colourspaces transfer functions.

Parameters:
  • colourspaces (list, optional) – Colourspaces transfer functions to plot.
  • inverse (bool) – Plot inverse transfer functions.
  • **kwargs (**) – Keywords arguments.
Returns:

Definition success.

Return type:

bool

Examples

>>> multi_transfer_function_plot(['sRGB', 'Rec. 709'])  
True