Foundations

Theme and colours

Change the brand palette, understand the theme tokens and keep light and dark mode readable.

config/brand.config.ts

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

config/brand.config.ts
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
primaryButtons, links, the active menu item, focus rings and the first chart series.
accentHighlights: badges, ratings and the second chart series.
inkMain text, the secondary button and the inverse surfaces.
stoneMuted text and the previous period in charts.
canvasThe page background.
paperCards, menus, dialogs and the sidebar.
sand / creamLight 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
Surfacesbackground, surface, surface-bright, surface-light, surface-muted, surface-variant, inverse
Brandprimary, secondary, tertiary, accent and their on-* text colours
Appnav-active, stone, rating
Chartschart-1 to chart-4
Trendstrend-positive, trend-negative and their -bg fills
Statuserror, success, warning, info
Neutralsblack, white, grey
Brand constantsbrand-ink, brand-cream, brand-canvas, brand-sand: the same in both modes
Categoriesclay, 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 typesdocumentPdf, 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
sidebarThe drawer when the user picks the semi-dark menu. It reuses darkTheme.
brandLanding 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():

ts
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.

ts
{
  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.

© 2026 melsami UI.
Developer documentation for melsami UI.