Skip to content
pixi-silk
GitHub repository
Interface

SwatchPopupOptions

import type { SwatchPopupOptions } from 'pixi-silk/ui/color';

Options of SwatchPopup.

Properties#

PropertyTypeDescriptionDefined in
colors?number[]Colours on the ring, 0xRRGGBB. Leave out to use the model’s recent colours. At most 16 are shown.ui/color/SwatchPopup.ts:16
model?ColorModelThe colour a pick writes to. Default: a new model.ui/color/SwatchPopup.ts:14
onPick?(color: number) => voidA colour was picked (already written to the model and committed).ui/color/SwatchPopup.ts:26
profiles?Partial<Record<InputKind, Partial<InputProfile>>>Per pointer kind overrides of size, falloff and tap timing.ui/color/SwatchPopup.ts:24
radius?numberRadius to the swatch centres, local units. Scaled by the pointer profile. Default 62.ui/color/SwatchPopup.ts:18
size?numberSwatch diameter, local units. Scaled by the pointer profile. Default 30.ui/color/SwatchPopup.ts:20
ticker?Ticker | nullTicker that runs the animation. Default Ticker.shared. With null, call SwatchPopup.tick yourself.ui/color/SwatchPopup.ts:22