#10
feat: accept a custom Seed in ChartConfig color
Motivation
The palette ships seven named colors. A brand adopting the kit (say, with a teal/cyan identity) currently has to hand-edit palette.ts to plot in its own hue — which means forking a core file and losing clean upstream syncs.
What
ChartConfig entries accept a full Seed alongside the named union:
const config = {
revenue: {
label: "Revenue",
color: { fill: [61, 216, 201], line: [160, 240, 231], star: [208, 250, 245] },
},
costs: { label: "Costs", color: "grey" }, // named colors unchanged
}Both controllers resolve through the existing isDitherColor guard in seedOf, so every consumer (canvas painters, legend, tooltip, dots, radar frame) picks custom seeds up with no further changes. No behavior change for named colors. Registry JSON regenerated via npm run build.
Rebased onto the #12 memoization rework — the custom-Seed branch now lives inside the useCallback'd seedOf in both controllers. Registry JSON regenerated; suite green (24/24).