@pbroom/color-kit/driverColor area
areColorAreaAxesDistinct
Whether the x and y axes drive different channels. An area whose axes share a channel cannot place a color unambiguously.
import { areColorAreaAxesDistinct } from '@pbroom/color-kit/driver';color-area.ts:312function areColorAreaAxesDistinct(
axes: { x: { channel: ColorAreaChannel }; y: { channel: ColorAreaChannel } },
): boolean;Parameters
- axes
{ x: { channel: ColorAreaChannel }; y: { channel: ColorAreaChannel } } - axes.x
{ channel: ColorAreaChannel } - axes.y
{ channel: ColorAreaChannel }
Returns
boolean
Example
import { areColorAreaAxesDistinct } from '@pbroom/color-kit/driver';
areColorAreaAxesDistinct({ x: { channel: 'l' }, y: { channel: 'c' } }); // → true
areColorAreaAxesDistinct({ x: { channel: 'l' }, y: { channel: 'l' } }); // → false