Brand on Vlak

Five custom properties let a product wear its brand. Every other token and rule stays as it is.

Two brands, light and dark

Each frame carries one brand's tokens on its own element, the way a product carries them on :root. The page around it does not change.

AEEG, light

Spring programme

Doors open at ten. Coffee is on the house. See the schedule

NewBooked

AEEG, dark

Spring programme

Doors open at ten. Coffee is on the house. See the schedule

NewBooked

Harbour, light

Quay review

Four reviews are open this week. Open the list

DraftDone

Harbour, dark

Quay review

Four reviews are open this week. Open the list

DraftDone

Rethink Sans is not hosted on this page, so AEEG's headings fall back to Inter here. Harbour sets Georgia, which most machines have. The solid badge is a state, so it stays ink in both brands.

PropertyVlak's valueDoes
--accentinkLinks, outline badges, the edge of a focused field.
--actioninkFill of the primary button.
--action-textpaperThe label on that fill.
--font-sansInterBody text and controls.
--font-display--font-sansThe display, display XL and title steps of the type scale.

Vlak's own CSS has no hue and a test keeps it so. With none of the hooks set, Vlak looks as it did in 0.5.0: a test compares the generated stylesheet with that release's once the hooks sit at their own values. Charts take their one spot colour from --rs-chart-spot or the spot prop; a brand sets it to its accent.

--action, --action-text, --font-sans and --font-display arrive in 0.6.0. On 0.5.0 and earlier only --accent takes effect.

:root{
  --bg:#F8F4EE;
  --text:#1C1B1B;
  --text-secondary:#6B6B6B;
  --accent:#A04A2A;
  --rs-chart-spot:#A04A2A;
  --action:#D4A24C;
  --action-text:#1C1B1B;
  --divider:rgba(28,27,27,0.08);
  --divider-subtle:rgba(28,27,27,0.06);
  --table-alt:rgba(28,27,27,0.02);
  --grid-line:rgba(28,27,27,0.04);
  --control-border:rgba(28,27,27,0.42);
  --control-fill:#E2DDD6;
  --font-sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-display:"Rethink Sans",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --fg:var(--text);
  --muted:var(--text-secondary);
  --border:var(--divider);
  --surface:var(--control-fill);
  --accent-fg:#FFFFFF;
}
[data-theme="light"]{
  --bg:#F8F4EE;
  --text:#1C1B1B;
  --text-secondary:#6B6B6B;
  --accent:#A04A2A;
  --rs-chart-spot:#A04A2A;
  --action:#D4A24C;
  --action-text:#1C1B1B;
  --divider:rgba(28,27,27,0.08);
  --divider-subtle:rgba(28,27,27,0.06);
  --table-alt:rgba(28,27,27,0.02);
  --grid-line:rgba(28,27,27,0.04);
  --control-border:rgba(28,27,27,0.42);
  --control-fill:#E2DDD6;
  --font-sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-display:"Rethink Sans",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --fg:var(--text);
  --muted:var(--text-secondary);
  --border:var(--divider);
  --surface:var(--control-fill);
  --accent-fg:#FFFFFF;
}
[data-theme="dark"]{
  --bg:#100D0B;
  --text:#E7E5E4;
  --text-secondary:#949494;
  --accent:#BA6242;
  --rs-chart-spot:#BA6242;
  --action:#D4A24C;
  --action-text:#100D0B;
  --divider:rgba(231,229,228,0.1);
  --divider-subtle:rgba(231,229,228,0.07);
  --table-alt:rgba(231,229,228,0.03);
  --grid-line:rgba(231,229,228,0.05);
  --control-border:rgba(231,229,228,0.38);
  --control-fill:#282321;
  --font-sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-display:"Rethink Sans",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --fg:var(--text);
  --muted:var(--text-secondary);
  --border:var(--divider);
  --surface:var(--control-fill);
  --accent-fg:#100D0B;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#100D0B;
    --text:#E7E5E4;
    --text-secondary:#949494;
    --accent:#BA6242;
    --rs-chart-spot:#BA6242;
    --action:#D4A24C;
    --action-text:#100D0B;
    --divider:rgba(231,229,228,0.1);
    --divider-subtle:rgba(231,229,228,0.07);
    --table-alt:rgba(231,229,228,0.03);
    --grid-line:rgba(231,229,228,0.05);
    --control-border:rgba(231,229,228,0.38);
    --control-fill:#282321;
    --font-sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
    --font-display:"Rethink Sans",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
    --fg:var(--text);
    --muted:var(--text-secondary);
    --border:var(--divider);
    --surface:var(--control-fill);
    --accent-fg:#100D0B;
  }
}
h1,h2,h3{font-family:var(--font-display)}

That is the sample brand above, in light and dark. It is unlayered, so it beats the vlak.tokens layer at any specificity, and it repeats the dark values under both selectors Vlak uses and the light values under data-theme="light", so a light section inside a dark page stays light. See Theming and Layers.

A face needs its own @font-face. Vlak ships Inter only.

@font-face {
  font-family: "Rethink Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/rethink-sans.woff2") format("woff2");
}

A brand that must change one of these should vendor the component source instead.

Vlak's own values meet them, and a brand's must too, in light and in dark. Ink against paper is 7:1. Secondary text, the accent against paper, and the action text against the action fill are 4.5:1. A control's border is 3:1. When a brand colour falls short, move its lightness, not its hue; the sample's accent is lighter in dark for that reason.

Only a main action takes --action: the primary button, a submit button, a send button. A selected, on, checked, active, progress, badge or avatar fill stays ink. When a rule is ambiguous it stays as it is. A test lists the rules that read --action, so a new one is a decision, not an accident.

RulePaintWhy
Button, primary variant (rs-btn-primary)--action on --action-textThe main action of a view. A dialog's primary action, the composer's send and stop, a confirmation's accept, and the play button are this Button, so they follow.
Inline form submit (rs-inline-field-btn)--action on --action-textThe one action of a one-field form.
Toggle pressed, checkbox, radio, switch, iOS and Android switch, pagination current page, calendar selected day, ratingink on paperA selected, on or checked state is a full-surface change in ink. In a brand colour it would read as an action.
Alarm panel, channel strip, check-in, clip timeline, colony plate, habit tracker, layer stack, patchbay, sequence alignment, spacing control, well plate, Android chip and navigation indicatorink on paperThe same selection rule, in the specialist components.
Progress, slider and iOS slider fill, audio meter, chart share segment, reference range marker, sleep timeline, parameter knob pointer, stepper done, assistant status dotinkThey show a value or a state, not something to press.
Solid badge, solid alert, tooltip bubble, focused menu itemink on paperStatus and chrome. A badge is information, not a call to act.
Terminal inverse and cursor, persona orb, workflow canvas dot, split handleinkMarks inside content. They keep ink so content stays legible on any brand.
Android FABink on paperAmbiguous, so it stays. It is the screen's main action, but its hover fill is --text-secondary, a gray that only reads against ink.