Unreleased software — APIs may change without notice.

toolbox

GitHub
Token

Color

Two axes for the surface and the ink. Three knobs for hue. Five semantic shortcuts.


Start here

For most work you only need two things: the .stage class for any region that should paint a surface, and the --fg knob to tune ink contrast on text and icons.

--bg is the third tool, and it earns its place — but use it sparingly. It paints a single element directly, which is right for a lone tag or an accent block, and wrong for anything a .stage would carry better. If you find yourself setting --bg on several nearby elements, reach for a .stage instead.

Rule of thumb: regions get .stage, text gets --fg, and --bg is for the occasional element that needs to paint on its own.


--bg  surface presence, 0 → 1

Higher values paint a louder, more chromatic surface. Default 0 (transparent on the parent). Use it for single painted elements — a tag, an accent — not for content regions.

0 0.2 0.4 0.6 0.8 1
<span style="--bg: 0.8">loud tag</span>

--fg  ink contrast, −1 → 1

Negative values are neutral ink (body, secondary, captions). Positive values are chromatic ink (accents, links, emphasis). This is the knob you reach for most.

−1 −0.5 0 0.5 0.8 1
<span style="--fg: 0.8">chromatic accent</span>

Hue

Three controls, all inheriting. Pick the right one for the intent.

--hue Brand. Set once on :root. Everything cascades.
--hue-shift Relative rotation off the brand. Variety in charts, KPIs, decorative accents.
--hue-lock Absolute hue. Wins over brand and shift. Semantic colors, branded sub-trees.
brand +60° +120° +180° +240° +300°
<:root style="--hue: 18">                  <!-- brand, page-wide -->
<div style="--hue-shift: 200">…</div>     <!-- relative rotation -->
<div style="--hue-lock: 145">…</div>      <!-- absolute, overrides -->

Semantic helpers

Built-in --hue-lock shortcuts for the conventional states.

success info warning danger neutral
<span class="tag suc">success</span>
<span class="tag inf">info</span>
<span class="tag wrn">warning</span>
<span class="tag dgr">danger</span>
<span class="tag bw">neutral</span>

Borders

Two derived border colors. They follow the element's current --bg and adapt to theme.

var(--border) quiet, low chroma
var(--Border) louder, slight chroma — for focus, hover

Don't assign these directly. They derive from the element's --bg; overriding desyncs them from their surface.