colour.RGB_colourspace_pointer_gamut_coverage_MonteCarlo#

colour.RGB_colourspace_pointer_gamut_coverage_MonteCarlo(colourspace: RGB_Colourspace, samples: int = 1000000, random_generator: Callable = random_triplet_generator, random_state: RandomState | None = None) float[source]#

Return given RGB colourspace percentage coverage of Pointer’s Gamut volume using Monte Carlo method.

Parameters:
  • colourspace (RGB_Colourspace) – RGB colourspace to compute the Pointer’s Gamut coverage percentage.

  • samples (int) – Sample count.

  • random_generator (Callable) – Random triplet generator providing the random samples.

  • random_state (RandomState | None) – Mersenne Twister pseudo-random number generator to use in the random number generator.

Returns:

Percentage coverage of Pointer’s Gamut volume.

Return type:

float

Examples

>>> from colour.models import RGB_COLOURSPACE_sRGB as sRGB
>>> prng = np.random.RandomState(2)
>>> RGB_colourspace_pointer_gamut_coverage_MonteCarlo(
...     sRGB, 10e3, random_state=prng
... )  
81...