Search
Search pages, pieces and blocks.
Colour
One warm grey scale, 50 to 990, and roles that point into it. Colour only ever means something: red is danger, green, amber and blue are status, cobalt says look here.
- Scale
- 23 steps
- Roles
- 38
- Night ceiling
- 300 #e2e2e1
In a real piece
A booking card, as shipped. Hover a role to find it in the card.
15 roles, 1 accent, 3 status inks. Everything else is grey.
- background#ffffff#1f1f1e
- card#ffffff#1f1f1e
- foreground#353535#e2e2e1
- muted-foreground#696968#adadac
- primary#353535#e2e2e1
- primary-foreground#ffffff#1f1f1e
- secondary#efefee#353535
- muted#f8f8f7#2b2b2b
- selected#efefee#353535
- border#eaeae9#353535
- input#eaeae9#353535
- success-ink#00732b#7fcc90
- warning-ink#904900#e6aa61
- destructive-ink#bc0000#ff8a8a
- cobalt#2867f2#6c9cfb
Scale
The same 23 steps in Day and Night. A dot marks a step a role points to in the current mode. Click to copy.
Roles point into the scale. Hover a step to see which roles use it, in Day and in Night.
Roles
Use the role, never the step. Day and Night values are computed from globals.css; uses are class and var() references in src/components and src/app.
| Token | Job | Day | Night | Uses | |
|---|---|---|---|---|---|
| Surfaces | |||||
| --background | The page, and text on a dark fill | #ffffff | #1f1f1e | 82 | |
| --card | Cards, the same as the page | #ffffff | #1f1f1e | 8 | |
| --popover | Menus, selects, tooltips: paper | #ffffff | #2b2b2b | 43 | |
| --sheet | The app panel inside App Shell | #ffffff | #1f1f1e | 5 | |
| --sidebar | Sidebars, set apart by a border only | #ffffff | #1f1f1e | 7 | |
| Text | |||||
| --foreground | Body text, titles, icons | #353535 | #e2e2e1 | 173 | |
| --muted-foreground | Hints, descriptions, secondary data | #696968 | #adadac | 339 | |
| --primary-foreground | Text on Primary | #ffffff | #1f1f1e | 24 | |
| Fills | |||||
| --primary | The one strong button per view | #353535 | #e2e2e1 | 54 | |
| --secondary | Secondary buttons, quiet badges | #efefee | #353535 | 9 | |
| --muted | Hover, tab lists, read-only fields | #f8f8f7 | #2b2b2b | 99 | |
| --selected | Selected and pressed, a step above hover | #efefee | #353535 | 35 | |
| --popover-accent | Hover inside a menu | #f5f5f4 | #353535 | 17 | |
| --popover-selected | Chosen row inside a menu | #efefee | #40403f | 9 | |
| --track | Empty part of Progress and Slider, Skeleton | #efefee | #353535 | 15 | |
| --range | Filled part of the Slider | #353535 | #bebebd | 2 | |
| Edges and focus | |||||
| --border | Dividers, card and table edges | #eaeae9 | #353535 | 91 | |
| --input | Field edges | #eaeae9 | #353535 | 54 | |
| --control-edge | Quiet edges on controls | #cccccb | #40403f | 13 | |
| --mark-edge | Checkbox, Radio, off Switch: 3:1 | #808080 | #747574 | 5 | |
| --popover-border | The paper edge | #e2e2e1 | #40403f | 20 | |
| --ring | Keyboard outline | #353535 | #e2e2e1 | 57 | |
| --field-focus | A focused field's edge | #8e8e8d | #747574 | 3 | |
| --halo | The soft ring outside a focused field | rgb(53 53 53 / 9%) | rgb(226 226 225 / 9%) | 2 | |
| Status | |||||
| --destructive | Danger: tints, edges, invalid rings | #e7000b | #ff6467 | 146 | |
| --destructive-ink | Red text on a red tint | #bc0000 | #ff8a8a | 18 | |
| --success | Success: dots, tints | #06853c | #67b479 | 9 | |
| --success-ink | Green text on a green tint | #00732b | #7fcc90 | 3 | |
| --warning | Warning: dots, tints | #a35b00 | #cd9248 | 21 | |
| --warning-ink | Amber text on an amber tint | #904900 | #e6aa61 | 4 | |
| --info | Info: dots, tints, text | #0f71c0 | #65a4e4 | 6 | |
| --cobalt | Look here, nothing is wrong: today, New | #2867f2 | #6c9cfb | 11 | |
| Charts and overlay | |||||
| --chart-1 | Series 1, lightest | #8e8e8d | #e2e2e1 | 7 | |
| --chart-2 | Series 2 | #747574 | #cccccb | 8 | |
| --chart-3 | Series 3 | #5e5e5d | #adadac | 9 | |
| --chart-4 | Series 4 | #494948 | #8e8e8d | 6 | |
| --chart-5 | Series 5, strongest | #353535 | #747574 | 3 | |
| --scrim | Dims the page behind Dialog and Sheet | rgb(25 25 24 / 10%) | rgb(25 25 24 / 10%) | 6 | |
Contrast
Computed from the shipped values for the pairs António actually puts together. Text needs 4.5:1, edges that carry meaning need 3:1.
| Pair | Tokens | Day | Night | Level | |
|---|---|---|---|---|---|
| Aa | Body text | foreground on background | 12.26 | 12.72 | AAA |
| Aa | Hint on the page | muted-foreground on background | 5.49 | 7.34 | AA |
| Aa | Hint on a hover fill | muted-foreground on muted | 5.17 | 6.30 | AA |
| Aa | Primary button | primary-foreground on primary | 12.26 | 12.72 | AAA |
| Aa | Secondary button | foreground on secondary | 10.66 | 9.46 | AAA |
| Aa | Menu row | foreground on popover | 12.26 | 10.92 | AAA |
| Aa | Error message | destructive-ink on background | 6.69 | 7.26 | AA |
| Aa | New tag, today | cobalt on background | 4.86 | 6.11 | AA |
| Aa | Info text | info on background | 5.06 | 6.27 | AA |
| Checkbox edge | mark-edge on background | 3.94 | 3.56 | 3:1 for edges | |
| Focused field edge | field-focus on background | 3.27 | 3.56 | 3:1 for edges | |
| Keyboard outline | ring on background | 12.26 | 12.72 | 3:1 for edges | |
| Divider | border on background | 1.20 | 1.34 | Decorative | |
| Aa | Destructive badge | destructive-ink on destructive 10% | 5.62 | 6.35 | AA |
| Aa | Success badge | success-ink on success 10% | 5.27 | 7.28 | AA |
| Aa | Warning badge | warning-ink on warning 10% | 5.86 | 6.88 | AA |
Do and don't
Colour is a signal. Spend it on the one thing that needs it.
Rules
- 1Use the role token, never a scale step or a hex. Roles are what change in Night.
- 2One Primary per view. Everything else is Secondary, Ghost or Outline.
- 3Status text uses its -ink token on a 10 percent tint of its colour. Solid status fills are not part of the system.
- 4Cobalt is never a button and never an error. It marks today and new things, nothing else.