colour.plotting.models.colourspace_model_axis_reorder

colour.plotting.models.colourspace_model_axis_reorder(a, model=None)[source]

Reorder the axes of given colourspace model \(a\) array according to the most common volume plotting axes order.

Parameters
  • a (array_like) – Colourspace model \(a\) array.

  • model (unicode, optional) – Colourspace model, see colour.COLOURSPACE_MODELS attribute for the list of supported colourspace models.

Returns

Reordered colourspace model \(a\) array.

Return type

ndarray

Examples

>>> a = np.array([0, 1, 2])
>>> colourspace_model_axis_reorder(a)
array([ 0.,  1.,  2.])
>>> colourspace_model_axis_reorder(a, 'CIE Lab')
array([ 1.,  2.,  0.])
>>> colourspace_model_axis_reorder(a, 'IPT')
array([ 1.,  2.,  0.])
>>> colourspace_model_axis_reorder(a, 'OSA UCS')
array([ 1.,  2.,  0.])