Colors and themes | kamod chartsSkip to content

Foundations

Colors and themes

Semantic chart tokens that follow light and dark mode.

Chart tokens

Import the charts theme once:

import "@kamod-ch/charts/theme.css";

Tokens resolve against Kamod UI semantic variables:

  • --chart-1 … --chart-4
  • --chart-axis, --chart-grid
  • --chart-tooltip-background, --chart-tooltip-foreground
  • --chart-focus-ring, --chart-reference-line

This docs site defines --brand once and maps --chart-1 to it.

Example

Custom paletteMonTueWedThuFriSatSun05101520
tsx
series={[
{ key: "deploys", label: "Deploys", color: "var(--chart-1)" },
{ key: "failures", label: "Failures", color: "var(--chart-4)" },
]}

Prefer CSS variables over hard-coded hex values so light and dark mode stay consistent.