@graphty/graphty-element / extend / PaletteDefinition
Interface: PaletteDefinition ​
Defined in: graphty-element/src/simple/types.ts:357
What definePalette takes: an id, a kind and the colours.
Properties ​
colorblindSafe? ​
readonlyoptionalcolorblindSafe?: readonly ("deuteranopia"|"protanopia"|"tritanopia")[]
Defined in: graphty-element/src/simple/types.ts:373
A claim the element takes on trust. Default: no claim.
colors ​
readonlycolors: readonlystring[]
Defined in: graphty-element/src/simple/types.ts:367
Any colour CSS can parse EXCEPT var(), which definePalette refuses with the fix in the message. Normalised to six-digit hex, so an alpha channel is discarded. A categorical palette has one colour per group; the element never wraps. A ramp needs at least two.
description? ​
readonlyoptionaldescription?:string
Defined in: graphty-element/src/simple/types.ts:371
One sentence for pickers and the catalogue.
id ​
readonlyid:string
Defined in: graphty-element/src/simple/types.ts:359
Permanent id: lower case, hyphenated, vendor-prefixed ("acme-brand").
kind ​
readonlykind:"categorical"|"sequential"|"diverging"
Defined in: graphty-element/src/simple/types.ts:361
"categorical" (one colour per group), "sequential" (low to high) or "diverging" (through a middle).
name? ​
readonlyoptionalname?:string
Defined in: graphty-element/src/simple/types.ts:369
What pickers show. Default: the id in sentence case.