@pbroom/color-kit/reactPlane geometry
ContrastRegionGeometry
Geometry returned by useContrastRegion.
import type { ContrastRegionGeometry } from '@pbroom/color-kit/react';use-contrast-region.ts:170interface ContrastRegionGeometry {
paths: ColorAreaContrastRegionPoint[][];
path: string;
fillPaths: ColorAreaContrastRegionPoint[][];
fillPath: string;
quality: ColorPlaneQualityLevel;
source: 'sync' | 'worker';
}Properties
- paths
ColorAreaContrastRegionPoint[][] - Contour lines bounding the passing colors, snapped onto the gamut boundary. A closed contour repeats its first point at the end.
- path
string - SVG path data for
pathsin a0 0 100 100viewBox; stroke it. - fillPaths
ColorAreaContrastRegionPoint[][] - Closed polygons covering the passing colors: open contours are closed along the gamut boundary on the passing side. While dragging, the last fresh polygons are kept until a current result arrives.
- fillPath
string - SVG path data for
fillPaths, each subpath closed withZ; fill it. - quality
ColorPlaneQualityLevel - Quality level the region was sampled at.
- source
'sync' | 'worker' - Where the current contours come from:
'worker'for a worker result,'sync'for a main-thread solve, including the idle result kept on screen while a drag waits for its first worker response.