colour.colorimetric_purity¶
-
colour.
colorimetric_purity
(xy, xy_n, cmfs=XYZ_ColourMatchingFunctions(name='CIE 1931 2 Degree Standard Observer', ...))[source]¶ Returns the colorimetric purity \(P_c\) for given colour stimulus \(xy\).
- Parameters
xy (array_like) – Colour stimulus CIE xy chromaticity coordinates.
xy_n (array_like) – Achromatic stimulus CIE xy chromaticity coordinates.
cmfs (XYZ_ColourMatchingFunctions, optional) – Standard observer colour matching functions.
- Returns
Colorimetric purity \(P_c\).
- Return type
numeric or array_like
References
Examples
>>> xy = np.array([0.54369557, 0.32107944]) >>> xy_n = np.array([0.31270000, 0.32900000]) >>> cmfs = CMFS['CIE 1931 2 Degree Standard Observer'] >>> colorimetric_purity(xy, xy_n, cmfs) 0.6135828...