@jsvision/ui / ColorPickerOptions
Interface: ColorPickerOptions
Defined in: ui/src/color/color-picker.ts:155
Options for a ColorPicker.
Properties
allowCustom?
optionalallowCustom?:boolean
Defined in: ui/src/color/color-picker.ts:163
Include a hex Input in the popup for arbitrary #rrggbb truecolor (default true).
colors?
optionalcolors?: readonlyColor[]
Defined in: ui/src/color/color-picker.ts:159
Palette forwarded to the ColorSwatch (default ANSI16_ORDER).
columns?
optionalcolumns?:number
Defined in: ui/src/color/color-picker.ts:161
Columns forwarded to the ColorSwatch (default 4).
label?
optionallabel?:string
Defined in: ui/src/color/color-picker.ts:165
Optional chip caption prefix (used when nameFor is absent).
nameFor?
optionalnameFor?: (c) =>string
Defined in: ui/src/color/color-picker.ts:167
Optional name accessor for the chip caption.
Parameters
c
Color
Returns
string
onChange?
optionalonChange?: (c) =>void
Defined in: ui/src/color/color-picker.ts:171
Fired on the discrete commit gesture (Enter / Space / mouse-up), which also closes the popup.
Parameters
c
Color
Returns
void
onInput?
optionalonInput?: (c) =>void
Defined in: ui/src/color/color-picker.ts:169
Fired on every live value change in the popup (arrow / click / drag).
Parameters
c
Color
Returns
void
value
value:
Signal<Color>
Defined in: ui/src/color/color-picker.ts:157
Two-way selected color (shared with the hosted swatch + hex field).