colour.RGB_colourspace_volume_coverage_MonteCarlo#

colour.RGB_colourspace_volume_coverage_MonteCarlo(colourspace: colour.models.rgb.rgb_colourspace.RGB_Colourspace, coverage_sampler: Callable, samples: int = 1000000, random_generator: Callable = random_triplet_generator, random_state: Optional[numpy.random.mtrand.RandomState] = None) float[source]#

Return given RGB colourspace percentage coverage of an arbitrary volume.

Parameters
Returns

Percentage coverage of volume.

Return type

numpy.floating

Examples

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