colour.volume.pointer_gamut Module

Pointer’s Gamut Volume Computations

Defines objects related to Pointer’s Gamut volume computations.

colour.volume.pointer_gamut.is_within_pointer_gamut(XYZ, tolerance=None)[source]

Returns if given CIE XYZ tristimulus values are within Pointer’s Gamut volume.

Parameters:
  • XYZ (array_like) – CIE XYZ tristimulus values.
  • tolerance (numeric, optional) – Tolerance allowed in the inside-triangle check.
Returns:

Is within Pointer’s Gamut.

Return type:

bool

Notes

  • Input CIE XYZ tristimulus values are in domain [0, 1].
  • This definition requires scipy to be installed.

Examples

>>> import numpy as np
>>> is_within_pointer_gamut(np.array([0.3205, 0.4131, 0.5100]))
array(True, dtype=bool)
>>> a = np.array([[0.3205, 0.4131, 0.5100],
...               [0.0005, 0.0031, 0.0010]])
>>> is_within_pointer_gamut(a)
array([ True, False], dtype=bool)