Color and grounds
Paper and night, ink for text and the one filled action, and two data hues.
Paper and night
The page is warm paper by day and near-black at night. Cards are surface with a 1px hairline edge, surfaceInset is the empty data cell and quiet fills, and surfaceRaised is for floating layers. Ink carries text in three strengths.
- Canvas
#f4f4f2 - Surface
#ffffff - Inset
#ececea - Ink
#111111 - Action
#111111 - Blue
#0c64ed
- Canvas
#0e0e0f - Surface
#161617 - Inset
#242425 - Ink
#f2f2ef - Action
#f2f2ef - Blue
#4b8dff
Ink is the action
The one filled action in a view is ink: a near-black pill by day and a near-white one at night. The action beside it is tonal, ink at 6 to 8 percent on whatever ground it sits on. No hue marks an action.
Do
One ink action. The other is tonal.
Avoid
Two filled actions: neither reads as the next step.
Blue is data
True blue marks observations, selection and keyboard focus, and nothing else. Headings, navigation, cards and actions stay achromatic. Yellow is the other data hue: what was earned. Both are drawn on the data language page.
#0c64ed, as text #0b5cd5#4b8dff, as text #4b8dffColor roles
Components use roles, never raw values. Each role has a day and a night value; the page picks the half that matches the reader's appearance setting, and Ground pins a region to one of them.
canvas#f4f4f2#0e0e0fThe page behind everything: paper by day, near-black at night.surface#ffffff#161617Cards, panels, and fields that lift off the canvas.surfaceInset#ececea#242425Quiet fills inside a surface: empty data cells, tracks, code, segmented controls.surfaceRaised#ffffff#1d1d1eMenus, popovers, and other floating layers.ink#111111#f2f2efPrimary text and icons.inkSecondary#45453f#bdbdb8Body copy, descriptions, and inactive navigation.inkTertiary#66665f#8c8c87Quiet labels, placeholders, and meta.hairlinergb(17 17 17 / 10%)rgb(255 255 255 / 9%)Card edges and separators between rows.hairlineStrongrgb(17 17 17 / 17%)rgb(255 255 255 / 16%)Separators on inset fills, table headers, and the resting underline of a link.fieldBorder#7d7d77#808079The boundary of a text field, at least 3:1 against its surface.controlBorderrgb(17 17 17 / 17%)rgb(255 255 255 / 16%)Decorative outlines of controls that are named by their text.indicator#0c64ed#4b8dffTrue blue: an observation, a selection, and focus. Data, never decoration.indicatorInk#0b5cd5#4b8dffThe blue as readable text, such as a tinted label.indicatorWash#e8f1ff#1d232eA pale blue behind blue text, and under the hatch of something partly done.indicatorHover#0b5ad6#6aa0ffA filled blue mark under a pointer.onIndicator#ffffff#111111Text and icons on a filled blue mark.action#111111#f2f2efThe one filled action in a view: an ink button.actionHover#2c2c2c#cececcThe filled action under a pointer.onAction#ffffff#111111The label of the filled action.tonalrgb(17 17 17 / 6%)rgb(255 255 255 / 8%)The secondary action: ink at low strength, on any ground.tonalHoverrgb(17 17 17 / 10%)rgb(255 255 255 / 13%)The secondary action under a pointer.danger#c22a30#f0767aDestructive actions and invalid fields.dangerInk#b3261e#ff8a8fError text.dangerWashrgb(194 42 48 / 10%)rgb(240 118 122 / 16%)A tinted background behind an error.onDanger#ffffff#111111Text on a filled destructive action.warning#a35200#f5a524Marks that need attention without being errors.warningInk#8f4700#f7b955Warning text.warningWashrgb(163 82 0 / 12%)rgb(245 165 36 / 16%)A tinted background behind a warning.focus#0c64ed#4b8dffThe keyboard focus ring.selectionrgb(12 100 237 / 18%)rgb(75 141 255 / 32%)Selected text.scrimrgb(17 17 17 / 32%)rgb(0 0 0 / 56%)The veil behind a modal dialog.Contrast
These ratios are calculated when the page renders, from the same palette and the same function the token tests run, with translucent colors blended over their ground first. Text needs 4.5:1; field edges, focus and the edges of data marks need 3:1.
| Text role | Canvas | Surface | Inset | Raised |
|---|---|---|---|---|
ink | Aa17.1:1 AAA | Aa18.8:1 AAA | Aa15.9:1 AAA | Aa18.8:1 AAA |
inkSecondary | Aa8.7:1 AAA | Aa9.6:1 AAA | Aa8.1:1 AAA | Aa9.6:1 AAA |
inkTertiary | Aa5.2:1 AA | Aa5.7:1 AA | Aa4.8:1 AA | Aa5.7:1 AA |
indicatorInk | Aa5.4:1 AA | Aa5.9:1 AA | Aa5.0:1 AA | Aa5.9:1 AA |
dangerInk | Aa5.9:1 AA | Aa6.5:1 AA | Aa5.5:1 AA | Aa6.5:1 AA |
warningInk | Aa6.2:1 AA | Aa6.8:1 AA | Aa5.7:1 AA | Aa6.8:1 AA |
| Text role | Canvas | Surface | Inset | Raised |
|---|---|---|---|---|
ink | Aa17.2:1 AAA | Aa16.1:1 AAA | Aa13.8:1 AAA | Aa15.0:1 AAA |
inkSecondary | Aa10.2:1 AAA | Aa9.5:1 AAA | Aa8.2:1 AAA | Aa8.9:1 AAA |
inkTertiary | Aa5.7:1 AA | Aa5.3:1 AA | Aa4.5:1 AA | Aa4.9:1 AA |
indicatorInk | Aa6.0:1 AA | Aa5.6:1 AA | Aa4.8:1 AA | Aa5.2:1 AA |
dangerInk | Aa8.5:1 AAA | Aa7.9:1 AAA | Aa6.8:1 AA | Aa7.4:1 AAA |
warningInk | Aa11.0:1 AAA | Aa10.3:1 AAA | Aa8.8:1 AAA | Aa9.6:1 AAA |
| Pair | Measured | Minimum |
|---|---|---|
| Field edge, dayAn empty field is found by its edge. | 3.7:1 | 3:1 |
| Field edge, nightThe same edge on the night surface. | 4.5:1 | 3:1 |
| Focus ring, dayKeyboard position must be visible. | 4.6:1 | 3:1 |
| Focus ring, nightKeyboard position on the night canvas. | 6.0:1 | 3:1 |
| Label on the ink action, dayAt rest. | 18.8:1 | 4.5:1 |
| Label on the ink action, nightThe near-white pill takes ink. | 16.8:1 | 4.5:1 |
| Label on a filled blue mark, nightNight blue is light, so its label is ink. | 5.8:1 | 4.5:1 |
| Label on a destructive action, nightNight danger is light, so its label is ink. | 6.8:1 | 4.5:1 |
| Earned rim on paperThe yellow fill keeps its edge. | 3.7:1 | 3:1 |
| Quiet text on the blue fieldTranslucent white blended over blue. | 5.0:1 | 4.5:1 |
Grounds
A region can be pinned with Ground, which declares every color token again with fixed values, so everything inside renders correctly whatever the page is doing. It records the tone in data-ground, which instruments read to know what a stimulus was actually shown on.
Light
Pinned to day, whatever the page is.
Dark
Pinned to night, whatever the page is.
Inverse
A dark band that lifts a step on a dark page.
Indicator
The pinned blue field, used sparingly.
Code
<div className="xrvj5dj xmjx1bh x1mkdm3x x9j0b88">
<u
tone="light"
name="Light"
note="Pinned to day, whatever the page is."
/>
<u
tone="dark"
name="Dark"
note="Pinned to night, whatever the page is."
/>
<u
tone="inverse"
name="Inverse"
note="A dark band that lifts a step on a dark page."
/>
<u
tone="indicator"
name="Indicator"
note="The pinned blue field, used sparingly."
/>
</div>
Never set color-scheme by hand
color-scheme on a region would not change its colors. Use Ground.Status colors
Danger and warning each have a fill, an ink for text and a wash for backgrounds. There is no success green: something finished is said in words, and what was earned is yellow.
This could not be saved.
Not counted: the screen details weren't recorded
Code
<Notice tone="danger" title="This could not be saved.">
Check your connection and try again. Nothing was changed.
</Notice>
<Notice
tone="warning"
title="Not counted: the screen details weren't recorded"
/>
<div className="x78zum5 x1a02dak xx5ye3b">
<StatusBadge>Waiting</StatusBadge>
<StatusBadge tone="indicator">Scored</StatusBadge>
<StatusBadge tone="warning">Needs review</StatusBadge>
<StatusBadge tone="danger">Failed</StatusBadge>
<StatusBadge tone="earned">+5 XP</StatusBadge>
</div>