Foundations
Themes
Light is Ink and dark is Stone. Decide the theme first, because every other choice follows from it.
Ink and Stone
- Ink is the light theme. White paper with cool ink.
- Stone is the dark theme. Warm black with paper-colored text.
- In Ink the page and the card are the same white. A card is told apart by its 1px
border, not by its surface color. - The two themes differ by token values only. Don't write rules that apply to one theme alone, and don't introduce new pure grays.
Ink (light)
3 things need your attention, and 2 are done.
Ri
Today's goals
Ria is waiting for your answer.
Customer inquiry replies
Ria is drafting replies.
Stone (dark)
3 things need your attention, and 2 are done.
Ri
Today's goals
Ria is waiting for your answer.
Customer inquiry replies
Ria is drafting replies.
Which surface uses which
| Surface | Theme |
|---|---|
| Public surfaces: landing, brand, blog, docs, link preview cards, slides | Stone, fixed. Built with data-theme="dark" on the root element. |
| The console (the app) | Follows the person's choice. The default is Stone. Draw the dark screen first, then make sure the light one does not break. |
| Output and document surfaces (the paper a person's document sits on) | Ink, always, whatever the theme around it. |
This site is a public surface, so it opens in Stone. The switch in the sidebar is here because the site has to show both.
Switching
The theme is one attribute. Every component reads role tokens, so nothing else changes when the attribute does.
<!-- Stone -->
<html data-theme="dark">
<!-- Ink. Also what you get when the attribute is absent -->
<html data-theme="light">
<!-- A subtree can take its own theme: an Output surface inside the dark console -->
<div data-theme="light">…</div>The values that set the tone
The full list is on the tokens page.
| Token | Light, then dark | Use |
|---|---|---|
| background | #ffffff#141311 | Page background. |
| card | #ffffff#1d1c19 | Surface of cards, panels and modals. |
| foreground | #17151f#f3f1ec | Body text. At least 4.5:1 on all five surfaces (background, card, muted, accent, popover). |
| muted-foreground | #696573#b3afa5 | Secondary text. The lightest text step. Do not use opacity to make text fainter. At least 4.5:1 on the five surfaces. Not used inside status soft surfaces (*-soft). |
| border | #e9e7ed#32302b | Dividers and card borders (decorative). Never the only boundary of a control. Input borders use input. |
| accent | #efedf2#35322d | Hover and selection surface. Selected tabs, chips and rows, and your own bubble. The only token for this. |
| primary | #17151f#f3f1ec | The fill. Primary button, toggle that is on, send button, progress bar. One filled button per group. Never for a selected state (selection is accent). |
| primary-foreground | #ffffff#1c1a17 | Text and icons on the primary fill. White in light, ink in dark. |
| star | #7b6cf0#b6a3f5 | Color of the star that shows an agent is working. Used only by the Star component. Never on buttons, text, surfaces, borders or badges. At least 3:1 on background, card and muted. |