from IPython.core.display import Image
Image(filename="resources/images/Colour_Logo_Medium_001.png")
from widgets import set_style
set_style()
Computes the colour transformation matrix between the given RGB Colourspace Models using the given Chromatic Adaptation Transform.
from widgets import RGB_colourspace_models_transformation_matrix_widget
RGB_colourspace_models_transformation_matrix_widget()
Qm94KGNoaWxkcmVuPShWQm94KGNoaWxkcmVuPShMYWJlbCh2YWx1ZT11J1JHQiBDb2xvdXJzcGFjZSBNb2RlbHMgVHJhbnNmb3JtYXRpb24gTWF0cml4JywgX2RvbV9jbGFzc2VzPSh1J3dpZGfigKY=
Computes the Chromatically Adapted Primaries of the given RGB Colourspace Model to the given Illuminant using the given Chromatic Adaptation Transform.
from widgets import RGB_colourspace_models_chromatically_adapted_primaries_widget
RGB_colourspace_models_chromatically_adapted_primaries_widget()
Qm94KGNoaWxkcmVuPShWQm94KGNoaWxkcmVuPShMYWJlbCh2YWx1ZT11J1JHQiBDb2xvdXJzcGFjZSBNb2RlbHMgQ2hyb21hdGljYWxseSBBZGFwdGVkIFByaW1hcmllcycsIF9kb21fY2xhc3PigKY=
Computes the Chromatically Adapted XYZ to RGB Matrix of the given RGB Colourspace Model to the given Illuminant using the given Chromatic Adaptation Transform.
Notes:
colour.XYZ_to_RGB_matrix
andcolour.RGB_to_XYZ_matrix
definitions are planned to be added to Colour to perform that computation directly.
import colour
input_colourspace = colour.RGB_COLOURSPACES['sRGB']
D50 = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D50']
M_CAT = colour.adaptation.chromatic_adaptation_matrix_VonKries(
colour.xyY_to_XYZ(colour.xy_to_xyY(input_colourspace.whitepoint)),
colour.xyY_to_XYZ(colour.xy_to_xyY(D50)),
transform='CAT02')
colour.utilities.dot_matrix(input_colourspace.XYZ_to_RGB_matrix, M_CAT)
array([[ 3.34502999, -1.43824292, -0.51857787], [-0.96856771, 1.84921036, 0.0432542 ], [ 0.05231262, -0.20627362, 0.80656844]])