Tokens
Aurora’s tokens are CSS custom properties. They are defined in
style/tokens.css,
and hyper sets its own values in
style/hyper.css.
This page is made from those two files.
The swatch shows the token in the theme that this site shows now. Change the theme with the select in the header to see the other values.
Colours
Section titled “Colours”A colour token holds a light and a dark value: --x: light-dark(<light>, <dark>).
“The same” means that one value serves each theme. In hyper, “the dark value”
means that hyper does not set the token: hyper has a dark base, so the token
takes its dark value. A -bg token is a tint of its hue, so it follows the
hue in each theme.
In Rust, token::X is the string "var(--x)". The tokens with no Rust
constant are used by the stylesheet; in Rust, write "var(--name)".
| Token | Values | Use | |
|---|---|---|---|
--bg |
Light: #f3f5f8Dark: #0e1116Hyper: #07070d |
The page. | |
--sidebar |
Light: #eceff4Dark: #12161cHyper: #0a0a14 |
The side navigation. | |
--panel |
Light: #ffffffDark: #161a21Hyper: #0f0f1c |
A panel or card. | |
--panel-2 |
Light: #f7f8faDark: #13171eHyper: #0c0c17 |
A second surface, one step from --panel: a modal footer, a row or card under the pointer. |
|
--inset |
Light: #eceff4Dark: #0a0c10Hyper: #050509 |
A sunken surface: inline code, code blocks, logs, the track of a segmented control. | |
--field |
Light: #ffffffDark: #0a0c10Hyper: #050509 |
The inside of an input, a select or a text area. | |
--control |
Light: #ffffffDark: #1b2129Hyper: #161628 |
The fill of a control: a default button, a segment, the track of a switch. | |
--control-hover |
Light: #eaeef4Dark: #20262fHyper: #1d1d34 |
A control or a row under the pointer. | |
--border |
Light: #dce1e8Dark: #232a34Hyper: #262642 |
A border. | |
--border-soft |
Light: #e5e9eeDark: #1d232cHyper: #1d1d34 |
A soft border: table rows, the header of a panel or a modal. | |
--border-fainter |
Light: #edf0f3Dark: #15191fHyper: #141424 |
The faintest line (the grid of a Hlin chart). | |
--border-control |
Light: #7c8695Dark: #5d6776Hyper: #6c69a6 |
The edge of an input, a select or a switch. 3:1 on the surfaces. | |
--fg |
Light: #18202bDark: #e6e9eeHyper: #ecebff |
Body text. | |
--fg-bright |
Light: #0b1119Dark: #f1f4f8Hyper: #ffffff |
The strongest text: titles. | |
--fg-2 |
Light: #354052Dark: #c3cbd5Hyper: #cac8f0 |
Second text: labels, table cells. | |
--fg-strong |
Light: #1d2531Dark: #dce2e9Hyper: #e0deff |
Strong text, between --fg and --fg-bright. |
|
--mutedtoken::MUTED |
Light: #525d6eDark: #8b95a3Hyper: #9d9acb |
Quiet text. Also the “idle” or “pending” status hue. | |
--fainttoken::FAINT |
Light: #5e6979Dark: #818b9bHyper: #918ec0 |
Faint text: placeholders, captions, panel titles. | |
--fainter |
Light: #7e8796Dark: #636c79Hyper: #6a679e |
Large text, disabled text and decoration only (3:1, not 4.5:1). | |
--icetoken::ICE |
Light: #1f60ccDark: #7fb2ffHyper: #00e5ff |
Hue: the accent. Links, filled buttons, “running”. | |
--tealtoken::TEAL |
Light: #0a7a70Dark: #5fd0c5Hyper: #00ffc8 |
Hue: teal. | |
--violettoken::VIOLET |
Light: #6344d4Dark: #9d8cffHyper: #b68cff |
Hue: violet. “Scheduled”. | |
--goldtoken::GOLD |
Light: #8a5800Dark: #d8a657Hyper: #ffc400 |
Hue: warning. “Cancelled”. | |
--oktoken::OK |
Light: #15793bDark: #4bd07fHyper: #3dff7a |
Hue: success. “Completed”. | |
--badtoken::BAD |
Light: #c22a2aDark: #f06464Hyper: #ff3d6e |
Hue: danger. “Failed”. | |
--skiptoken::SKIP |
Light: #a1386cDark: #cf83a4Hyper: #ff52d9 |
Hue: “skipped”. | |
--ice-fgtoken::ICE_FG |
Light: #174ca6Dark: #7fb2ffHyper: #00e5ff |
Text on the --ice-bg fill (a pill, a badge). |
|
--teal-fgtoken::TEAL_FG |
Light: #086b62Dark: #5fd0c5Hyper: #00ffc8 |
Text on the --teal-bg fill (a pill, a badge). |
|
--violet-fgtoken::VIOLET_FG |
Light: #5836c4Dark: #9d8cffHyper: #b68cff |
Text on the --violet-bg fill (a pill, a badge). |
|
--gold-fgtoken::GOLD_FG |
Light: #7a4d00Dark: #d8a657Hyper: #ffc400 |
Text on the --gold-bg fill (a pill, a badge). |
|
--ok-fgtoken::OK_FG |
Light: #126a33Dark: #4bd07fHyper: #3dff7a |
Text on the --ok-bg fill (a pill, a badge). |
|
--bad-fgtoken::BAD_FG |
Light: #a51f1fDark: #f06464Hyper: #ff3d6e |
Text on the --bad-bg fill (a pill, a badge). |
|
--skip-fgtoken::SKIP_FG |
Light: #8f2f5fDark: #cf83a4Hyper: #ff52d9 |
Text on the --skip-bg fill (a pill, a badge). |
|
--muted-fgtoken::MUTED_FG |
Light: #4a5465Dark: #8b95a3Hyper: #9d9acb |
Text on the --muted-bg fill (a pill, a badge). |
|
--ice-bgtoken::ICE_BG |
Light: color-mix(in srgb, var(--ice) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --ice-fg. |
|
--teal-bgtoken::TEAL_BG |
Light: color-mix(in srgb, var(--teal) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --teal-fg. |
|
--violet-bgtoken::VIOLET_BG |
Light: color-mix(in srgb, var(--violet) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --violet-fg. |
|
--gold-bgtoken::GOLD_BG |
Light: color-mix(in srgb, var(--gold) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --gold-fg. |
|
--ok-bgtoken::OK_BG |
Light: color-mix(in srgb, var(--ok) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --ok-fg. |
|
--bad-bgtoken::BAD_BG |
Light: color-mix(in srgb, var(--bad) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --bad-fg. |
|
--skip-bgtoken::SKIP_BG |
Light: color-mix(in srgb, var(--skip) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --skip-fg. |
|
--muted-bgtoken::MUTED_BG |
Light: color-mix(in srgb, var(--muted) 11%, transparent)Dark: the same Hyper: the same |
The tinted fill behind --muted-fg. |
|
--on-statustoken::ON_STATUS |
Light: #ffffffDark: #0b0d10Hyper: #05050a |
Text on a solid status fill (a count badge). | |
--on-accent |
Light: #ffffffDark: #0b0d10Hyper: #05050a |
Text on a solid accent fill: a filled button, an active chip. | |
--bad-muted |
Light: #8e3b3bDark: #b97a7aHyper: #e08aa2 |
Second error text: the detail line under an error. | |
--edge |
Light: #7e8795Dark: #626b79Hyper: #6c69a6 |
The edges of the graph. 3:1 on the panels. | |
--brand-stroke |
Light: #3a76dcDark: #8fbcffHyper: #5cf0ff |
The stroke of a brand mark (a product logo). | |
--ice-3 |
Light: #3a78deDark: #93bcffHyper: #5cf0ff |
The ice scale, step 3: for hover and active on ice fills. | |
--ice-5 |
Light: #1a53b3Dark: #669ff2Hyper: #00c8e0 |
The ice scale, step 5: a filled button under the pointer. | |
--ice-7 |
Light: #154494Dark: #4f7fd0Hyper: #00a8bf |
The ice scale, step 7: a filled button while it is pressed. | |
--tooltip-bg |
Light: #1b2330Dark: #05070aHyper: #03030a |
The fill of a tooltip. | |
--tooltip-fg |
Light: #f1f4f8Dark: #e6e9eeHyper: #ecebff |
The text of a tooltip. | |
--tooltip-border |
Light: #1b2330Dark: #232a34Hyper: #3a3a66 |
The border of a tooltip. | |
--scrim |
Light: rgba(16, 24, 38, 0.32)Dark: rgba(5, 7, 10, 0.65)Hyper: rgba(3, 3, 10, 0.72) |
The shade behind a drawer or the open side navigation. | |
--shadow-sm |
Light: 0 4px 16px rgba(16, 24, 38, 0.14)Dark: 0 4px 16px rgba(0, 0, 0, 0.5)Hyper: 0 4px 16px rgba(0, 0, 0, 0.6) |
A small shadow: a tooltip, a card under the pointer. | |
--shadow-md |
Light: 0 12px 32px rgba(16, 24, 38, 0.14)Dark: 0 12px 32px rgba(0, 0, 0, 0.5)Hyper: 0 12px 32px rgba(0, 0, 0, 0.6) |
A medium shadow: a menu, a toast, the sign-in card. | |
--shadow-lg |
Light: 0 20px 60px rgba(16, 24, 38, 0.2)Dark: 0 20px 60px rgba(0, 0, 0, 0.6)Hyper: 0 20px 60px rgba(0, 0, 0, 0.7) |
A large shadow: a modal, a drawer. | |
--scrollbar |
Light: #c3cad4Dark: #283039Hyper: #2c2c4c |
The thumb of a scrollbar. | |
--aurora-2 |
Light: linear-gradient(90deg, var(--teal), var(--ice))Dark: the same Hyper: the same |
The Aurora gradient: teal to ice. | |
--aurora-3 |
Light: linear-gradient(90deg, var(--teal), var(--ice), var(--violet))Dark: the same Hyper: the same |
The Aurora gradient: teal, ice, violet. |
| Token | Value |
|---|---|
--radius-xs |
2px |
--radius-sm |
4px |
--radius-md |
8px |
--radius-lg |
16px |
--radius-xl |
32px |
--radius-pill |
10px |
--radius-panel |
11px |
--radius-chip |
20px |
Spacing
Section titled “Spacing”| Token | Value |
|---|---|
--space-xs |
10px |
--space-sm |
12px |
--space-md |
16px |
--space-lg |
20px |
--space-xl |
32px |
Font sizes
Section titled “Font sizes”| Token | Value |
|---|---|
--fs-xs |
12px |
--fs-sm |
14px |
--fs-md |
16px |
--fs-lg |
18px |
--fs-xl |
20px |
Control heights
Section titled “Control heights”| Token | Value |
|---|---|
--h-xs |
30px |
--h-sm |
36px |
--h-md |
42px |
Font families
Section titled “Font families”| Token | Value |
|---|---|
--font-sans |
"IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif |
--font-mono |
"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace |
Colour helpers in Rust
Section titled “Colour helpers in Rust”These functions are in aurora_leptos::tokens.
| Function | Gives |
|---|---|
tint(color, pct) |
color at pct per cent opacity: color-mix(in srgb, <color> <pct>%, transparent). |
fill_for(color) |
The fill for color: var(--x-bg) for a hue token, else an 11% tint. |
fg_for(color) |
The text colour on that fill: var(--x-fg) for a hue token, else color. |
pill_bg(color) |
The same as fill_for. |
status_color(status) |
The hue token of a status text (see Components). |