colour.volume.macadam_limits Module¶
Optimal Colour Stimuli - MacAdam Limits¶
Defines objects related to Optimal Colour Stimuli computations.
-
colour.volume.macadam_limits.
is_within_macadam_limits
(xyY, illuminant, tolerance=None)[source]¶ Returns if given CIE xyY colourspace array is within MacAdam limits of given illuminant.
Parameters: - xyY (array_like) – CIE xyY colourspace array.
- illuminant (unicode) – Illuminant.
- tolerance (numeric, optional) – Tolerance allowed in the inside-triangle check.
Returns: Is within MacAdam limits.
Return type: Notes
- Input CIE xyY colourspace array is in domain [0, 1].
Examples
>>> is_within_macadam_limits(np.array([0.3205, 0.4131, 0.51]), 'A') array(True, dtype=bool) >>> a = np.array([[0.3205, 0.4131, 0.51], ... [0.0005, 0.0031, 0.001]]) >>> is_within_macadam_limits(a, 'A') array([ True, False], dtype=bool)