colour.normalised_primary_matrix#

colour.normalised_primary_matrix(primaries: ArrayLike, whitepoint: ArrayLike) NDArrayFloat[source]#

Compute the Normalised Primary Matrix (NPM) converting a RGB colourspace array to CIE XYZ tristimulus values using the specified primaries and whitepoint \(xy\) chromaticity coordinates.

Parameters:
  • primaries (ArrayLike) – Primaries \(xy\) chromaticity coordinates.

  • whitepoint (ArrayLike) – Illuminant / whitepoint \(xy\) chromaticity coordinates.

Returns:

Normalised Primary Matrix (NPM).

Return type:

numpy.ndarray

References

[SocietyoMPaTEngineers93]

Examples

>>> p = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
>>> w = np.array([0.32168, 0.33767])
>>> normalised_primary_matrix(p, w)
array([[ 9.5255239...e-01,  0.0000000...e+00,  9.3678631...e-05],
       [ 3.4396645...e-01,  7.2816609...e-01, -7.2132546...e-02],
       [ 0.0000000...e+00,  0.0000000...e+00,  1.0088251...e+00]])