Brand on Vlak
Five custom properties let a product wear its brand. Every other token and rule stays as it is.
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.
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.
The five hooks
| Property | Vlak's value | Does |
|---|---|---|
--accent | ink | Links, outline badges, the edge of a focused field. |
--action | ink | Fill of the primary button. |
--action-text | paper | The label on that fill. |
--font-sans | Inter | Body text and controls. |
--font-display | --font-sans | The 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.
Set them in your own CSS
: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.
- The five hooks:
--accent,--action,--action-text,--font-sansand--font-display. - A slight tint. Paper and ink move 2%, and the control fill 3%, toward the accent; the hairlines take the ink's colour. These are ordinary token values. Leave them out and Vlak keeps its neutral paper and gray.
--rs-chart-spot, set to the accent.--fg,--muted,--border,--surfaceand--accent-fgare aliases for pages that read a shorter vocabulary. Vlak does not read them.- The last rule gives headings the display face. Vlak's own display steps already use
--font-display.
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");
}What stays fixed
- The 204px module, the grid verticals and the gutters.
- 1px hairlines, square chrome, and the one 4px control radius.
- 44px hit targets and the control scale.
- Sentence case, weights 500 and 600, and the type scale's sizes and tracking.
- Selection by a full-surface fill, never a stripe or a bar.
- Motion: the durations, the one curve, and reduced motion.
- Layers, the rs-* class names, and the focus ring.
A brand that must change one of these should vendor the component source instead.
Contrast floors
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.
Primary or selected
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.
| Rule | Paint | Why |
|---|---|---|
| Button, primary variant (rs-btn-primary) | --action on --action-text | The 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-text | The one action of a one-field form. |
| Toggle pressed, checkbox, radio, switch, iOS and Android switch, pagination current page, calendar selected day, rating | ink on paper | A 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 indicator | ink on paper | The 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 dot | ink | They show a value or a state, not something to press. |
| Solid badge, solid alert, tooltip bubble, focused menu item | ink on paper | Status and chrome. A badge is information, not a call to act. |
| Terminal inverse and cursor, persona orb, workflow canvas dot, split handle | ink | Marks inside content. They keep ink so content stays legible on any brand. |
| Android FAB | ink on paper | Ambiguous, so it stays. It is the screen's main action, but its hover fill is --text-secondary, a gray that only reads against ink. |