colour.matrix_RGB_to_RGB#

colour.matrix_RGB_to_RGB(input_colourspace: RGB_Colourspace | LiteralRGBColourspace | str, output_colourspace: RGB_Colourspace | LiteralRGBColourspace | str, chromatic_adaptation_transform: LiteralChromaticAdaptationTransform | str | None = 'CAT02') NDArrayFloat[source]#

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

Parameters:
Returns:

Conversion matrix \(M\).

Return type:

numpy.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...]])
>>> matrix_RGB_to_RGB("sRGB", "ProPhoto RGB")
...
array([[ 0.5288241...,  0.3340609...,  0.1373616...],
       [ 0.0975294...,  0.8790074...,  0.0233981...],
       [ 0.0163599...,  0.1066124...,  0.8772485...]])