src/data/config/theme.json. Changing a token updates every component that uses it — including both dark mode (the default) and light mode. You never need to touch a CSS file or a component to retheme your site.
The theme.json file
The theme file has aname field and a tokens object that groups all design decisions:
src/data/config/theme.json
Color tokens
OlonJS uses semantic color naming — each token name describes the role, not the literal hue. This means you can swap the entire palette by editingtokens.colors without hunting for hardcoded hex values inside components.
The Inkwell theme also defines extended tokens like
card, elevated, overlay, ring, primary-light, primary-dark, and *-foreground variants for each semantic color. You can add as many tokens as your design system needs.
Updating a color
To change the brand color, edit theprimary token in tokens.colors:
Before
After
var(--color-primary) rather than a hardcoded value, the update propagates across all buttons, links, chips, and highlighted text in one edit.
Light mode override
tokens.modes.light.colors overrides any base token when the visitor’s theme is set to light. The default mode is dark; light mode is activated when document.documentElement.dataset.theme === 'light'.
The light palette in Inkwell replaces every color token with a lighter counterpart:
src/data/config/theme.json (excerpt)
modes.light.colors falls back to its base value.
Typography tokens
Control font families for body text, code, display headings, and the site wordmark:src/data/config/theme.json (excerpt)
To swap fonts, replace the font-family strings and add the corresponding
@import or <link> to your Next.js layout.
Spacing and border radius
Spacing tokens
These control macro layout dimensions shared across all sections:Border radius tokens
Adjust these tokens to shift the overall “roundness” of the UI — for example, setting all values to
0 produces a sharp, editorial look, while larger values create a softer, app-like feel..png?fit=max&auto=format&n=AyzhRn9-CO-nDNc4&q=85&s=63c78e2325701880237e6cbce1399c2a)
.png?fit=max&auto=format&n=AyzhRn9-CO-nDNc4&q=85&s=0db283df6e4d31745079d6d03fd029ed)