Foundations
Theme and colours
Change the brand palette, understand the theme tokens and keep light and dark mode readable.
You edit two palettes with readable names in config/brand.config.ts; config/theme.config.ts maps them to the tokens Vuetify uses. Touch theme.config.ts only for fine tuning, such as the status colours, the category scale or the shadow strength.
1. Edit the palettes
export const LIGHT = {
primary: '#B5441E',
primaryDark: '#97361A',
accent: '#F2B329',
ink: '#3B2219',
stone: '#6E625A',
cream: '#F8F2E7',
canvas: '#FBF8F3',
sand: '#E9DCC8',
paper: '#FFFFFF',
} as const
Role | Used for |
|---|---|
primary | Buttons, links, the active menu item, focus rings and the first chart series. |
accent | Highlights: badges, ratings and the second chart series. |
ink | Main text, the secondary button and the inverse surfaces. |
stone | Muted text and the previous period in charts. |
canvas | The page background. |
paper | Cards, menus, dialogs and the sidebar. |
sand / cream | Light fills such as code chips and tonal backgrounds. |
DARK has the same roles plus a few dark-only shades (paperLight, paperRaised, mist…). Change both objects so dark mode keeps your brand.
2. Understand the tokens
lightTheme and darkTheme turn the palettes into Vuetify colours. They must keep the same keys in the same order. The groups are:
Group | Tokens |
|---|---|
| Surfaces | background, surface, surface-bright, surface-light, surface-muted, surface-variant, inverse |
| Brand | primary, secondary, tertiary, accent and their on-* text colours |
| App | nav-active, stone, rating |
| Charts | chart-1 to chart-4 |
| Trends | trend-positive, trend-negative and their -bg fills |
| Status | error, success, warning, info |
| Neutrals | black, white, grey |
| Brand constants | brand-ink, brand-cream, brand-canvas, brand-sand: the same in both modes |
| Categories | clay, ochre, sage, slate, plum, moss with their on-* colours: an earthy scale for labels, course categories, calendars, folders and product categories. Use them for categories and keep success, warning, error and info for status. |
| File types | documentPdf, spreadsheets, images… used by BaseFileIcon, built from the category scale |
Every token becomes a class (bg-surface-muted, text-primary, border-primary) and a CSS variable (rgb(var(--v-theme-primary))). Use them instead of hex values, so the component follows the theme and the customizer.
Theme variables
Each theme also sets variables: the border colour and opacity, the medium-emphasis opacity and the shadow strength (shadow-key-opacity, shadow-ambient-opacity). Change shadows here, not in vuetify.scss, so components and the elevation-* classes stay identical.
3. Keep status colours readable
BaseAlert writes the status colour on a tinted background of the same colour. Every light-theme error, success, warning and info must keep a contrast of at least 4.5:1 against that tint (WCAG AA). Check the contrast before you change them.
Extra themes
Theme | Where it applies |
|---|---|
sidebar | The drawer when the user picks the semi-dark menu. It reuses darkTheme. |
brand | Landing sections with tone: 'brand' and the highlighted BasePlanCard, applied through v-theme-provider. It follows the customizer preset. |
merova, orbello (+ -dark, -brand) | The own brands of the demo landings, built by landingBrandTheme() into LANDING_SAMPLE_THEMES and registered by provideLandingBrand() only on the page that uses them, so the other pages do not ship their CSS. See LandingPage. |
Components inside the sidebar must read the local theme with useTheme().current.value.dark, never preferences.isDark, because the drawer can be dark while the page is light.
Read colours at runtime
Most components only need classes. When you must pass a colour value, such as to a canvas or a chart library, use useColors():
const { resolveColor } = useColors()
const border = resolveColor('primary')
Charts already do this through useChartColors(), so never pass hex colours to BaseChart.
Primary presets
The customizer offers alternative palettes from PRIMARY_PRESETS. A preset needs only primary; secondary, tertiary and accent are derived by resolvePalette() in utils/palette.ts when you leave them out. Every preset except the default also recolours the brand theme through resolveBrandPalette(): a dark surface in the hue of the preset with its light primary, so highlighted plan cards and brand sections follow the palette.
{
id: 'ocean',
light: { primary: '#1D6FA3' },
dark: { primary: '#7CB8E0' },
}
Add its name as customizer.primary.ocean in locales/<code>/common.json. The Appearance page explains how presets are applied.