Theming

Soft is the default. Omit theme, or set "auto" or "soft". The plot is transparent and the colours follow the page: light-dark() tracks prefers-color-scheme and an ancestor's color-scheme. The optional card is #f5f5f7 in light and #1c1c1e in dark. --ck-* still overrides, and --chart-N is the next fallback.

Text inherits the page font. Axis labels, titles, legends, tooltips, data labels, and annotations use the family of the element around the chart. Size and weight stay on the theme. Set theme.tokens.fontFamily to a CSS family list, or --ck-font-family on an ancestor, to override. "inherit" keeps the page font when a preset names one (Tape, Kite, Mustard, and Violet do). A value over 80 characters, or one with a double quote, <, >, ;, braces, or a backslash, is CK3086 and is not applied. A saved SVG or a Cloud PNG has no page to inherit from, so it uses Inter, ui-sans-serif, system-ui, sans-serif. The first name is where a later Cloud font set will sit.

refined and editorial are built-in names. theme: "midnight" is the opt-in dark card. Any other name still falls through to midnight until you import that preset from @chartkitdev/core/themes/all.

Default. Omit theme, or set auto or soft. Transparent plot on a #f5f5f7 / #1c1c1e card.

Edit
Edit

This next chart leaves theme unset, so it is Soft with this page's text and grid tokens on top.

Edit

Tokens

VariableRole
--ck-backgroundChart background. The site sets this to transparent so the page shows through.
--ck-surfaceCard fill inside KPI and similar charts.
--ck-textTitles, values, and legend labels.
--ck-mutedAxis ticks and secondary labels. Keep this at 4.5:1 against the page.
--ck-gridGrid lines.
--ck-axisAxis line, when a chart draws one.
--ck-accentAccent stroke, used by gauges and rings.
--ck-positiveA good delta.
--ck-negativeA bad delta.
--ck-series-1 … nSeries colors, in order. Leave these unset to use the core palette.
--ck-font-familyOptional family. Unset, the chart inherits the page font. A saved SVG or Cloud PNG uses Inter, then the system sans.

Light and dark

css
.chart-host {
  --ck-background: transparent;
  --ck-text: #1d1d1f;
  --ck-muted: #6e6e73;
  --ck-grid: rgb(0 0 0 / 0.06);
  --ck-positive: #047857;
  --ck-negative: #be123c;
}

.dark .chart-host {
  --ck-text: #f5f5f7;
  --ck-muted: #98989d;
  --ck-grid: rgb(245 245 247 / 0.08);
  --ck-positive: #30d158;
  --ck-negative: #ff453a;
}

Muted text has to clear 4.5:1 against the page. Midnight's #8a8a8a does not, on white, so the page default is auto and the host sets --ck-muted. Point the series variables at a shadcn palette:

css
.chart-host {
  --ck-series-1: var(--chart-1);
  --ck-series-2: var(--chart-2);
  --ck-series-3: var(--chart-3);
  --ck-series-4: var(--chart-4);
  --ck-series-5: var(--chart-5);
}

theme.tokens.series

A spec can replace the series list without a preset name. The base stays Soft unless you set preset. lines defaults to the same list, so thin strokes follow the fills unless you pass a darker set.

json
{
  "version": "1",
  "type": "bar",
  "theme": {
    "tokens": {
      "series": ["#007aff", "#34c759", "#ff9500", "#af52de"]
    }
  }
}

paletteFromBrand

paletteFromBrand is opt-in. It is not in the line bundle and it is not the default theme. Pass one hex colour, or a list, and "light" or "dark". Put the result on theme.tokens.series.

ts
import { paletteFromBrand } from "@chartkitdev/core/themes/brand";

const series = paletteFromBrand("#007aff", "light");
const spec = { version: "1", type: "bar", theme: { tokens: { series } } };

paletteFromBrand("#007aff", "light") from @chartkitdev/core/themes/brand. The page scheme picks light or dark. Every colour clears 3:1 on white or on #09090b, not on this card.

Dashboards

The dashboard pages pass each board’s colors through theme.tokens, so axes, grid, and series follow that board. Page CSS draws the chrome. Names stay in the style of those products. ChartKit is not affiliated with them.

Presets

Soft, refined, editorial, and midnight are built in. Tape, Kite, Mustard, and Violet register with the older names (midnight, emerald, mono, slate, arctic, orchid, obsidian, neon, mocha, owl, retro, copper, rose, sunset, silver, pearl, latte) when you import @chartkitdev/core/themes/all. A brand hex or a drawing can derive a preset. Several of the older muted colours are under 4.5:1 on their own background, which is why Soft is the default.