colour.is_within_macadam_limits¶
- colour.is_within_macadam_limits(xyY: ArrayLike, illuminant: Union[Literal['A', 'C', 'D65'], str] = 'D65', tolerance: Optional[Floating] = None) NDArray [source]¶
Return whether given CIE xyY colourspace array is within MacAdam limits of given illuminant.
- Parameters
xyY (ArrayLike) – CIE xyY colourspace array.
illuminant (Union[Literal[('A', 'C', 'D65')], str]) – Illuminant name.
tolerance (Optional[Floating]) – Tolerance allowed in the inside-triangle check.
- Returns
Whether given CIE xyY colourspace array is within MacAdam limits.
- Return type
Notes
Domain
Scale - Reference
Scale - 1
xyY
[0, 1]
[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)