@pbroom/color-kit/driverColor input
resolveColorInputWrap
Returns wrap when given, otherwise whether the channel is a hue (OKLCH or HSL h), which wraps around its range instead of clamping.
import { resolveColorInputWrap } from '@pbroom/color-kit/driver';color-input.ts:322function resolveColorInputWrap<Model extends ColorInputModel>(
model: Model,
channel: ColorInputChannelFor<Model>,
wrap?: boolean,
): boolean;Parameters
- model
Model - channel
ColorInputChannelFor<Model> - wrap?
boolean
Returns
boolean
Example
import { resolveColorInputWrap } from '@pbroom/color-kit/driver';
resolveColorInputWrap('hsl', 'h'); // → true
resolveColorInputWrap('oklch', 'l'); // → false
resolveColorInputWrap('oklch', 'h', false); // → false