SwatchPaletteOptions
import type { SwatchPaletteOptions } from 'pixi-silk/ui/color';
Options of SwatchPalette.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
colors? | number[] | Fixed colours (0xRRGGBB). Leave out to show the model’s history (recent colours). | ui/color/SwatchPalette.ts:15 |
columns? | number | Swatches per row in a grid. Default 8. | ui/color/SwatchPalette.ts:19 |
gap? | number | Space between swatches in local units. Default 6. | ui/color/SwatchPalette.ts:23 |
layout? | "ring" | "grid" | grid rows of rounded squares, ring circles around the origin. Default grid. | ui/color/SwatchPalette.ts:17 |
model? | ColorModel | The colour a pick writes to, and whose history it shows. Default: a new model. | ui/color/SwatchPalette.ts:13 |
placeholders? | number | Empty slots drawn while history is short. Default: columns for history, 0 for fixed colours. | ui/color/SwatchPalette.ts:27 |
profiles? | Partial<Record<InputKind, Partial<InputProfile>>> | Per pointer kind overrides of the tap slop. | ui/color/SwatchPalette.ts:31 |
radius? | number | Ring radius (to the swatch centres). Default fits the count. | ui/color/SwatchPalette.ts:25 |
size? | number | Swatch size in local units. Default 24. | ui/color/SwatchPalette.ts:21 |
ticker? | Ticker | null | Ticker that runs the hover and pop animation. Default Ticker.shared. With null, call SwatchPalette.tick yourself. | ui/color/SwatchPalette.ts:29 |