colour.characterisation.whitepoint_preserving_matrix#
- colour.characterisation.whitepoint_preserving_matrix(M: ArrayLike, RGB_w: ArrayLike = ones(3)) NDArrayFloat [source]#
Normalise given matrix \(M\) to preserve given white point \(RGB_w\).
- Parameters:
M (ArrayLike) – Matrix \(M\) to normalise.
RGB_w (ArrayLike) – White point \(RGB_w\) to normalise the matrix \(M\) with.
- Returns:
Normalised matrix \(M\).
- Return type:
Examples
>>> M = np.reshape(np.arange(9), (3, 3)) >>> whitepoint_preserving_matrix(M) array([[ 0., 1., 0.], [ 3., 4., -6.], [ 6., 7., -12.]])