|
| 1 | +# Color |
| 2 | + |
| 3 | +Use **semantic aliases** for all UI that adapts to color mode or theme. Use raw palette tokens only when a color must stay fixed regardless of mode. |
| 4 | + |
| 5 | +## Semantic aliases |
| 6 | + |
| 7 | +### Text |
| 8 | + |
| 9 | +| Token | Light | Dark | Use for | |
| 10 | +|---|---|---|---| |
| 11 | +| `text` | `#10162F` | `#ffffff` | Default body and UI text | |
| 12 | +| `text-accent` | `#0A0D1C` | `#FFF0E5` | Stronger emphasis text | |
| 13 | +| `text-secondary` | navy-800 75% | white 65% | Supporting / secondary copy | |
| 14 | +| `text-disabled` | navy-800 63% | white 50% | Disabled state labels | |
| 15 | + |
| 16 | +### Background |
| 17 | + |
| 18 | +| Token | Light | Dark | Use for | |
| 19 | +|---|---|---|---| |
| 20 | +| `background` | `#ffffff` | `#10162F` | Default page/component background | |
| 21 | +| `background-primary` | `#FFF0E5` | `#0A0D1C` | Slightly elevated surfaces | |
| 22 | +| `background-contrast` | white | black | Maximum contrast surface | |
| 23 | +| `background-selected` | navy-800 4% | white 4% | Selected row / item | |
| 24 | +| `background-hover` | navy-800 12% | white 9% | Hover state overlay | |
| 25 | +| `background-disabled` | navy-800 12% | white 9% | Disabled surface | |
| 26 | +| `background-success` | `#F5FFE3` | `#151C07` | Success state container | |
| 27 | +| `background-warning` | `#FFFAE5` | `#211B00` | Warning state container | |
| 28 | +| `background-error` | `#FBF1F0` | `#280503` | Error state container | |
| 29 | + |
| 30 | +### Interactive |
| 31 | + |
| 32 | +| Token | Light | Dark | Use for | |
| 33 | +|---|---|---|---| |
| 34 | +| `primary` | `#3A10E5` | `#FFD300` | Primary CTA, links, focus rings | |
| 35 | +| `primary-hover` | `#5533FF` | `#CCA900` | Hover on primary interactive | |
| 36 | +| `primary-inverse` | `#FFD300` | `#3A10E5` | Primary on a colored background | |
| 37 | +| `secondary` | `#10162F` | `#ffffff` | Secondary CTA, ghost buttons | |
| 38 | +| `secondary-hover` | navy-800 86% | white 80% | Hover on secondary interactive | |
| 39 | +| `interface` | `#3A10E5` | `#FFD300` | Checkboxes, toggles, sliders | |
| 40 | +| `interface-hover` | `#5533FF` | `#CCA900` | Hover on interface elements | |
| 41 | +| `danger` | `#E91C11` | `#E85D7F` | Destructive actions, error states | |
| 42 | +| `danger-hover` | `#BE1809` | `#DC5879` | Hover on danger interactive | |
| 43 | + |
| 44 | +### Border |
| 45 | + |
| 46 | +| Token | Light | Dark | Use for | |
| 47 | +|---|---|---|---| |
| 48 | +| `border-primary` | `#10162F` | `#ffffff` | Strong borders, dividers | |
| 49 | +| `border-secondary` | navy-800 75% | white 65% | Medium-weight borders | |
| 50 | +| `border-tertiary` | navy-800 28% | white 20% | Subtle borders, separators | |
| 51 | +| `border-disabled` | navy-800 63% | white 50% | Disabled input borders | |
| 52 | + |
| 53 | +### Feedback |
| 54 | + |
| 55 | +| Token | Light | Dark | Use for | |
| 56 | +|---|---|---|---| |
| 57 | +| `feedback-error` | `#BE1809` | `#E85D7F` | Error messages, validation | |
| 58 | +| `feedback-success` | `#008A27` | `#AEE938` | Success messages | |
| 59 | +| `feedback-warning` | `#FFD300` | `#FFFAE5` | Warning messages | |
| 60 | + |
| 61 | +## Raw palette |
| 62 | + |
| 63 | +Use raw tokens only when color must be **fixed** (not adaptive). |
| 64 | + |
| 65 | +| Name | Weights | Key values | |
| 66 | +|---|---|---| |
| 67 | +| `navy` | 100–900 | 800 = `#10162F`, 900 = `#0A0D1C` | |
| 68 | +| `hyper` | 400, 500 | 500 = `#3A10E5`, 400 = `#5533FF` | |
| 69 | +| `yellow` | 0, 400, 500, 900 | 500 = `#FFD300` | |
| 70 | +| `red` | 0, 300, 400, 500, 600, 900 | 500 = `#E91C11` | |
| 71 | +| `green` | 0, 100, 400, 700, 900 | 700 = `#008A27` | |
| 72 | +| `blue` | 0, 100, 300, 400, 500, 800 | 500 = `#1557FF` | |
| 73 | +| `beige` | — | `#FFF0E5` | |
| 74 | +| `pink` | 0, 400 | 400 = `#F966FF` | |
| 75 | +| `orange` | 100, 500 | 500 = `#FF8C00` | |
| 76 | + |
| 77 | +Named shorthand aliases: `beige`, `blue`, `green`, `hyper`, `navy`, `orange`, `pink`, `red`, `yellow`, `black`, `white` |
| 78 | + |
| 79 | +## Decision guide |
| 80 | + |
| 81 | +``` |
| 82 | +Coloring UI text or backgrounds? |
| 83 | + └─ Needs to adapt to light/dark or theme? → use semantic alias (text, background, primary, …) |
| 84 | + └─ Must be fixed regardless of mode? → use raw token (navy-800, yellow-500, …) |
| 85 | + └─ Setting a section background with content inside? → use <Background bg="…"> (see modes.md) |
| 86 | +``` |
0 commit comments