colour.matrix_RGB_to_RGB

colour.matrix_RGB_to_RGB(input_colourspace, output_colourspace, chromatic_adaptation_transform='CAT02')[source]

Computes the matrix \(M\) converting from given input RGB colourspace to output RGB colourspace using given chromatic adaptation method.

Parameters
  • input_colourspace (RGB_Colourspace) – RGB input colourspace.

  • output_colourspace (RGB_Colourspace) – RGB output colourspace.

  • chromatic_adaptation_transform (str, optional) – {‘CAT02’, ‘XYZ Scaling’, ‘Von Kries’, ‘Bradford’, ‘Sharp’, ‘Fairchild’, ‘CMCCAT97’, ‘CMCCAT2000’, ‘CAT02 Brill 2008’, ‘CAT16’, ‘Bianco 2010’, ‘Bianco PC 2010’, None}, Chromatic adaptation transform, if None no chromatic adaptation is performed.

Returns

Conversion matrix \(M\).

Return type

ndarray

Examples

>>> from colour.models import (
...    RGB_COLOURSPACE_sRGB, RGB_COLOURSPACE_PROPHOTO_RGB)
>>> matrix_RGB_to_RGB(RGB_COLOURSPACE_sRGB, RGB_COLOURSPACE_PROPHOTO_RGB)
... 
array([[ 0.5288241...,  0.3340609...,  0.1373616...],
       [ 0.0975294...,  0.8790074...,  0.0233981...],
       [ 0.0163599...,  0.1066124...,  0.8772485...]])