Every colour in Veylo is a CSS variable set by the active theme. Change the theme and the whole kit follows, including the bevels, which are built from four tones of the face colour.
| Name | Mode | Character |
|---|---|---|
graphite | dark | Default. Charcoal face, violet accent. |
midnight | dark | Blue-slate face, blue accent. |
classic | light | Grey face, navy title bars. The original look. |
lilac | light | Lavender face, purple accent. |
paper | light | Near-white, blue accent. Quiet and document-like. |
Set data-theme on the .veylo element:
<div class="veylo" data-theme="midnight"> ... </div>With veylo.js loaded you can also call veylo.setTheme('classic'), or add a picker that fills itself and remembers the choice in localStorage:
<select data-veylo-theme></select>Themes are scoped, so two .veylo elements on one page can use different themes.
| Variable | Meaning |
|---|---|
--face | Surface colour of windows, buttons and cards |
--field | Colour of inputs, tables and sunken areas |
--desk | Page background behind windows |
--stripe | Zebra rows, quotes, notes |
--code-bg | Code blocks |
--text, --text-dim | Body text and secondary text |
--link, --visited | Link colours |
--ok, --no, --err | Success, warning and error |
--b1 to --b4 | Bevel tones, lightest highlight to darkest shadow |
--rule | Thin borders and dividers |
--acc, --acc-a, --acc-b | Accent, and the two ends of the title bar gradient |
--fs, --fs-sm, --lh | Base font size, small size, line height |
--ui, --mono | Font stacks |
--measure | Maximum width of .veylo (default 58rem) |
Override tokens on .veylo, or define a new data-theme block. Set all of --face, --field, --b1 to --b4, --rule, --text and the --acc trio so bevels and text stay readable:
.veylo[data-theme="rose"] {
color-scheme: dark;
--face: #3a2f33; --field: #241c1f; --desk: #2b2326; --code-bg: #171113; --stripe: #2d2427;
--text: #f1e6e9; --text-dim: #b39ca3; --link: #ff9bb3; --visited: #d99bff;
--ok: #7fe08f; --no: #f2b46b; --err: #ff8b8b;
--b1: #8a7479; --b2: #55444a; --b3: #1e1518; --b4: #0a0607; --rule: #6e5a60;
--acc-a: #66122e; --acc-b: #ef6a8d; --acc: #d6456b;
}Dark themes should set color-scheme: dark so scrollbars and native controls match. The select arrows are drawn from --ar-u, --ar-d, --ar-l and --ar-r (inline SVG data URIs); copy them from a built-in theme of the same mode.
The text caret can be a block, bar or underscore: data-caret="block|bar|underscore|auto" on .veylo, or veylo.setCaret('bar').