Contributing themes
A theme is a grammar pack: mark form, axes, legend policy, typeface, plot chrome, padding. Hex is one column — never the whole theme. Site light/dark mode is unrelated.
Do not invent a seventh chart type. Do not pull a chart runtime into packages/ or apps/.
Layout
Add a pack under packages/themes/<id>/:
packages/themes/<id>/
theme.ts # token table (same keys as folio)
README.md # intent + fence id
examples/ # ≥ bar, line, pie fences with theme: <id>Steps
- Implement
theme.tswith the sameThemeTokenskeys aspackages/themes/folio/theme.ts. No vendor chart deps. - Register the pack in
packages/themes/registry.ts(themeRegistry+ package exports). Missing packs fail loudly viaresolveThemePack. - Add the id to
THEMESin@markvis/irso the parser accepts the fence string. Omit →folio. Unknown →E_UNKNOWN_THEMEplus table fallback — never a silent swap. - Wire Play / Examples labels separately; this package is token truth only.
- Keep snapshots under
examples/out/themes/green when visuals change on purpose (UPDATE_SNAPSHOTS=1).
@markvis/render-svg imports the registry only. Public fence field:
chart
type: bar
theme: folio
title: Feb led Q3 at 180
x: month
y: revenue
month,revenue
Jan,120
Feb,180
Mar,150Allowed today: folio · highcharts · shadcn · docs · ant · recharts. See Themes for grammar vs palette.