Theming
Two hex values compile to a full OKLCH palette with WCAG-AA contrast and sRGB gamut guaranteed, in light and dark.
Rebranding the portal does not mean hunting down colour literals. You edit two hex values and a compiler produces the rest.
The file
import { defineTheme } from "@frontstead/tokens/theme";// Edit these values to match the portal brand. The token compiler turns them into// app/theme.generated.css (an OKLCH :root/.dark override layered on top of// the brand-neutral preset, WCAG-AA + sRGB-gamut guaranteed).// Regenerate after editing: `npm run gen:theme`.export default defineTheme({ palette: { primary: "#56664e", accent: "#8a5a3c", },});That is the entire theme surface. primary and accent.
What the compiler does
npm run gen:theme reads theme.config.ts and writes apps/portal/app/theme.generated.css:
/* GENERATED from theme.config.ts by scripts/gen-theme.mts — do not edit. */:root { --radius: 0.375rem; --background: oklch(0.975 0.006 88); --foreground: oklch(0.22 0.015 252); --card: oklch(0.995 0.003 88); --primary: oklch(0.4897 0.0421 135.29); --primary-foreground: oklch(0.99 0 0); /* … */}Three things are worth noticing:
- Output is OKLCH, not hex. OKLCH lightness is perceptually uniform, so deriving hover states, muted variants, and foreground pairings from it produces consistent results across hues in a way hex manipulation does not.
- Contrast is guaranteed, not hoped for. The compiler holds WCAG-AA and keeps every generated colour inside the sRGB gamut. You cannot pick a brand colour that quietly produces unreadable button text.
- Light and dark are both generated. You do not hand-tune a dark palette; the compiler emits a
:root/.darkpair.
Do not edit theme.generated.css by hand — it is overwritten. gen:theme also runs automatically as part of npm run dev and npm run build for the portal, so in practice it stays current on its own.
The design contract
The generated palette sits inside a documented design contract. From DESIGN.md:
Frontstead Kit uses compact soft brutalism: structured, calm, border-first interfaces with restrained motion and real-estate polish.
Which the same document expands into rules a theme is expected to respect:
- Prefer visible borders and tonal separation over glow, blur, and heavy shadow.
- Use small, disciplined radii instead of universally rounded containers.
- Keep standout panels near white against a quieter warm-neutral canvas.
- Reserve strong contrast for actions, navigation state, and focused emphasis.
- Let listing imagery carry desirability; interface chrome should remain quiet.
Because the palette is token-based, a theme that follows the contract stays coherent when you change primary — you are moving one variable, not restyling components.
Logos and copy
Beyond colour, a rebrand touches the two logo SVGs in apps/portal/public/ and whatever headline copy you want to change in app/layout.tsx and app/page.tsx.
How small a rebrand actually is
A complete end-to-end rebrand of a portal built on the kit — new name, domain, brokerage identity, palette, logos, and market copy — measures out at eight files and thirty-four added lines:
apps/portal/app/layout.tsx | 2 +- apps/portal/app/page.tsx | 2 +- apps/portal/app/theme.generated.css | 14 +++++++------- apps/portal/components/why-this-market.tsx | 27 +++++++++++++-------------- apps/portal/public/logo-light.svg | 5 +---- apps/portal/public/logo.svg | 5 +---- apps/portal/theme.config.ts | 10 +++++----- packages/portal-config/src/portal.config.ts | 10 +++++----- 8 files changed, 34 insertions(+), 41 deletions(-)Of those eight: one is compiler output, two are logos, three are copy, and two are the config files you already know about. Because the changes stay inside the seams the kit designs for them, git pull upstream main continues to merge cleanly — which is the actual point. A fork you cannot update is a snapshot, not a foundation.
Next
Going live — one config file and a deploy.