@pbroom/color-kit/driverColor state

SetColorRequestedOptions

Options for setColorRequested.

interfaceimport type { SetColorRequestedOptions } from '@pbroom/color-kit/driver';color-state.ts:349
interface SetColorRequestedOptions extends MapDisplayedColorsOptions {
  gamutMapMethod?: GamutMapMethod;
  explicitHue?: boolean;
}

Properties

gamutMapMethod?GamutMapMethoddefault 'chroma-reduction'
Gamut mapping passed to toSrgbGamut / toP3Gamut. The setters default to the state's current meta.gamutMapMethod instead.
explicitHue?booleandefault true
Whether requested.h is an OKLCH hue the caller stated. When false and requested is achromatic, the state's current requested hue is kept (see resolveIncomingRequested). Pass false for colors converted from hex, RGB, HSL, HSV or any non-OKLCH string.