@pbroom/color-kit/driverColor area
toColorAreaPlaneDefinition
Builds the plain plane definition for a color area's axes and reference color. This is the single source of truth for plane payloads sent to plane-query workers and other transport boundaries. The result is plain JSON and can be passed to definePlane from @pbroom/color-kit/plane.
import { toColorAreaPlaneDefinition } from '@pbroom/color-kit/driver';color-area.ts:365function toColorAreaPlaneDefinition(
axes: ResolvedColorAreaAxes,
reference: Color,
): ColorAreaPlaneDefinition;Parameters
Returns
Example
import { resolveColorAreaAxes, toColorAreaPlaneDefinition } from '@pbroom/color-kit/driver';
toColorAreaPlaneDefinition(resolveColorAreaAxes(), { l: 0.6, c: 0.1, h: 250, alpha: 1 });
// → { model: 'oklch',
// x: { channel: 'l', range: [0, 1] },
// y: { channel: 'c', range: [0, 0.4] },
// fixed: { l: 0.6, c: 0.1, h: 250, alpha: 1 } }