inGamut - multiple declarations
Function inGamut
Reports whether an encoded sRGB value is directly representable in sRGB.
All three components must be finite and from 0 through 1 inclusive; no tolerance is applied.
Parameters
| Name | Description |
|---|---|
| color | Encoded sRGB value to test. |
Returns
true exactly when all components are finite and in [0, 1].
Example
assert(SRgbd(0.1, 0.5, 1.0) .inGamut);
assert(!SRgbd(-0.1, 0.5, 1.0) .inGamut);
Function inGamut
Reports whether a linear-light sRGB value is directly representable in sRGB.
All three components must be finite and from 0 through 1 inclusive; no tolerance is applied.
Parameters
| Name | Description |
|---|---|
| color | Linear-light sRGB value to test. |
Returns
true exactly when all components are finite and in [0, 1].
Example
assert(LinearSRgbd(0.1, 0.5, 1.0) .inGamut);
assert(!LinearSRgbd(0.1, 1.1, 0.5) .inGamut);