Gamut
Utilities for gamut diagnostics and analysis.
Methods
gamutDelta
static
public static function gamutDelta(ColorInterface $color, string $space): float
Quantify the out-of-gamut overflow for a color.
Returns the maximum absolute deviation from the [0, 1] range.
Parameters
| Name | Type | Default |
|---|---|---|
$color |
ColorInterface | - |
$space |
string | - |
isInGamut
static
public static function isInGamut(ColorInterface $color, string $space, float $epsilon): bool
Check if a color is representable in a target RGB-like space.
Parameters
| Name | Type | Default |
|---|---|---|
$color |
ColorInterface | - |
$space |
string | - |
$epsilon |
float | 1.0e-6 |