inP3Gamut
Returns whether an OKLCH color is inside the Display P3 gamut.
import { inP3Gamut } from '@pbroom/color-kit';membership.ts:140function inP3Gamut(color: Color): boolean;Tests the unclamped linear Display P3 channels with isLinearRgbInGamut (so clamping in toP3 cannot produce a false positive), allowing GAMUT_EPSILON of slack on the encoded channels. Allocation-free.
Parameters
Returns
boolean
Example
import { inP3Gamut, inSrgbGamut } from '@pbroom/color-kit';
const green = { l: 0.7, c: 0.2, h: 150, alpha: 1 };
inP3Gamut(green); // → true
inSrgbGamut(green); // → false