Defines colour models volume and gamut plotting objects:
Reference colourspaces to labels mapping.
Returns a grid on xy plane made of quad geometric elements and its associated faces and edges colours. Ticks and labels are added to the given axes accordingly to the extended grid settings.
Parameters: |
|
---|---|
Returns: | Grid quads, faces colours, edges colours. |
Return type: | tuple |
Examples
>>> c = 'Rec. 709'
>>> RGB_scatter_plot(c)
True
Converts from CIE XYZ tristimulus values to given reference colourspace.
Parameters: |
|
---|---|
Returns: | Reference colourspace values. |
Return type: | ndarray |
Examples
>>> import numpy as np
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> W = np.array([0.34567, 0.35850])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE XYZ')
array([ 0.0704953..., 0.1008 , 0.0955831...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE xyY')
array([ 0.2641477..., 0.3777000..., 0.1008 ])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE xy')
array([ 0.2641477..., 0.3777000...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE Lab')
array([-23.6230288..., -4.4141703..., 37.9856291...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE LCHab')
array([ 24.0319036..., 190.5841597..., 37.9856291...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE Luv')
array([-28.7922944..., -1.3558195..., 37.9856291...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE Luv uv')
array([ 0.1508531..., 0.4853297...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE LCHuv')
array([ 28.82419932, 182.69604747, 37.9856291 ])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE UCS uv')
array([ 0.1508531..., 0.32355314...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'CIE UVW')
array([-28.0483277..., -0.8805242..., 37.0041149...])
>>> XYZ_to_reference_colourspace(
... XYZ, W, 'IPT')
array([-0.1111479..., 0.0159474..., 0.3657112...])
Returns an RGB identity cube made of quad geometric elements and its associated RGB colours.
Parameters: |
|
---|---|
Returns: | Cube quads, RGB colours. |
Return type: | tuple |
Examples
>>> vertices, RGB = RGB_identity_cube(None, 1, 1, 1)
>>> vertices
array([[[ 0., 0., 0.],
[ 1., 0., 0.],
[ 1., 1., 0.],
[ 0., 1., 0.]],
[[ 0., 0., 1.],
[ 1., 0., 1.],
[ 1., 1., 1.],
[ 0., 1., 1.]],
[[ 0., 0., 0.],
[ 1., 0., 0.],
[ 1., 0., 1.],
[ 0., 0., 1.]],
[[ 0., 1., 0.],
[ 1., 1., 0.],
[ 1., 1., 1.],
[ 0., 1., 1.]],
[[ 0., 0., 0.],
[ 0., 1., 0.],
[ 0., 1., 1.],
[ 0., 0., 1.]],
[[ 1., 0., 0.],
[ 1., 1., 0.],
[ 1., 1., 1.],
[ 1., 0., 1.]]])
>>> RGB
array([[ 0.5, 0.5, 0. ],
[ 0.5, 0.5, 1. ],
[ 0.5, 0. , 0.5],
[ 0.5, 1. , 0.5],
[ 0. , 0.5, 0.5],
[ 1. , 0.5, 0.5]])
Plots given RGB colourspaces gamuts in given reference colourspace.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> c = ['Rec. 709', 'ACEScg', 'S-Gamut']
>>> RGB_colourspaces_gamuts_plot(c)
True
Plots given RGB colourspace array in a scatter plot.
Parameters: |
|
---|---|
Returns: | Definition success. |
Return type: | bool |
Examples
>>> c = 'Rec. 709'
>>> RGB_scatter_plot(c)
True