Theme System
Cascading token system for theming and branding
The client uses a cascading token system for theming.
Cascade Order
Defaults → Network → Organization → User
Each layer specifies only the overrides it needs. The merge happens in:
packages/client/src/core/lib/theme.ts
Tokens are applied via:
packages/client/src/core/providers/ThemeProvider.tsx
Theme Overrides (JSON)
Theme overrides are stored as JSON in:
network.themeorganization.theme
Supported fields include:
accentColorbgBase,bgRaised,bgOverlay,bgPopover,bgSubtle,bgMutedinkOpacity,inkSecondaryOpacity,inkTertiaryOpacitylineOpacitysuccessColor,warningColor,errorColor,infoColorradiusScale(sharp|default|rounded|pill)font(inter|system)protocolColors(per-network color map)
Example:
Using Tokens in UI
Use the theme hook to access computed colors:
Notes
network.primaryColorstill exists as a legacy fallback foraccentColor.- CSS variables are injected on web, while NativeWind
vars()is used for native.