@pbroom/color-kit/driverColor state

CreateColorStateOptions

Options for createColorState.

interfaceimport type { CreateColorStateOptions } from '@pbroom/color-kit/driver';color-state.ts:103
interface CreateColorStateOptions {
  activeGamut?: GamutTarget;
  activeView?: ViewModel;
  source?: ColorSource;
  gamutMapMethod?: GamutMapMethod;
}

Properties

activeGamut?GamutTargetdefault 'display-p3'
Gamut whose displayed color the UI renders. Any value other than 'srgb' or 'display-p3' throws a TypeError.
activeView?ViewModeldefault 'oklch'
Model the picker shows channels or text in.
source?ColorSourcedefault 'programmatic'
Source recorded in meta.source.
gamutMapMethod?GamutMapMethoddefault 'chroma-reduction'
Gamut mapping used for the displayed sRGB / P3 colors.