@pbroom/color-kit/reactPlane geometry

ContrastRegionGeometry

Geometry returned by useContrastRegion.

interfaceimport type { ContrastRegionGeometry } from '@pbroom/color-kit/react';use-contrast-region.ts:170
interface ContrastRegionGeometry {
  paths: ColorAreaContrastRegionPoint[][];
  path: string;
  fillPaths: ColorAreaContrastRegionPoint[][];
  fillPath: string;
  quality: ColorPlaneQualityLevel;
  source: 'sync' | 'worker';
}

Properties

pathsColorAreaContrastRegionPoint[][]
Contour lines bounding the passing colors, snapped onto the gamut boundary. A closed contour repeats its first point at the end.
pathstring
SVG path data for paths in a 0 0 100 100 viewBox; stroke it.
fillPathsColorAreaContrastRegionPoint[][]
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.
fillPathstring
SVG path data for fillPaths, each subpath closed with Z; fill it.
qualityColorPlaneQualityLevel
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.