@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.

functionimport { areColorAreaAxesDistinct } from '@pbroom/color-kit/driver';color-area.ts:312
function areColorAreaAxesDistinct(
  axes: { x: { channel: ColorAreaChannel }; y: { channel: ColorAreaChannel } },
): boolean;

Parameters

axes{ x: { channel: ColorAreaChannel }; y: { channel: ColorAreaChannel } }

Returns

boolean

Example

TypeScript
import { areColorAreaAxesDistinct } from '@pbroom/color-kit/driver';

areColorAreaAxesDistinct({ x: { channel: 'l' }, y: { channel: 'c' } }); // → true
areColorAreaAxesDistinct({ x: { channel: 'l' }, y: { channel: 'l' } }); // → false