ContrastOptions
Options shared by relativeLuminance, contrastRatio, contrastAPCA, meetsAA and meetsAAA.
import type { ContrastOptions } from '@pbroom/color-kit';metrics.ts:31interface ContrastOptions {
gamut?: GamutTarget;
precision?: ContrastPrecision;
}Properties
- gamut?
GamutTargetdefault'srgb' - Display gamut the colors are shown in. Channels are clipped to this gamut before luminance is measured, so out-of-gamut colors are measured as the display would render them by clipping. Contrast regions with
gamut: 'display-p3'use the same setting. - precision?
ContrastPrecisiondefault'exact' - Channel precision; see
ContrastPrecision.