colour.colorimetric_purity#

colour.colorimetric_purity(xy: ArrayLike, xy_n: ArrayLike, cmfs: MultiSpectralDistributions | None = None) NDArrayFloat[source]#

Return the colorimetric purity \(P_c\) for given colour stimulus \(xy\).

Parameters:
  • xy (ArrayLike) – Colour stimulus CIE xy chromaticity coordinates.

  • xy_n (ArrayLike) – Achromatic stimulus CIE xy chromaticity coordinates.

  • cmfs (MultiSpectralDistributions | None) – Standard observer colour matching functions, default to the CIE 1931 2 Degree Standard Observer.

Returns:

Colorimetric purity \(P_c\).

Return type:

np.float or numpy.ndarray

References

[CIET14804b], [Erdb]

Examples

>>> from colour.colorimetry import MSDS_CMFS
>>> cmfs = MSDS_CMFS["CIE 1931 2 Degree Standard Observer"]
>>> xy = np.array([0.54369557, 0.32107944])
>>> xy_n = np.array([0.31270000, 0.32900000])
>>> colorimetric_purity(xy, xy_n, cmfs)  
0.6135828...