@kanunilabs/datagrid-enterprise
@kanunilabs/datagrid-enterprise / chartPalette
Function: chartPalette()
chartPalette(
accent,count):string[]
count colours derived from accent, index-stable.
Falls back to the packaged eight when the accent cannot be read — an unthemed
grid, or a custom theme whose --dg-primary is something this cannot parse
(a named colour, color-mix(), oklch()). Falling back is deliberate: a
chart with the wrong-but-readable palette beats a chart of black shapes.
A near-grey accent also falls back. Rotating the hue of something with almost no saturation produces eight indistinguishable greys, which is worse than an off-theme palette that can actually be told apart.
Parameters
accent
string | null | undefined
count
number
Returns
string[]