theme-systemlisted
Install: claude install-skill ham7a311/Vitrine
# /theme-system
A theme is a set of **roles**, not a palette. Components ask for "the text colour for secondary information on a raised surface", never for `#837d88`. Get the roles right and dark mode, brand changes and accessibility fixes become one-line edits.
## 1. Inventory what exists
- Find every hard-coded colour, font size, radius, shadow and duration in the components:
```
grep -rnoE "#[0-9a-fA-F]{3,8}\b|rgba?\([^)]*\)|oklch\([^)]*\)" src --include=*.{css,tsx,jsx} | sort | uniq -c | sort -rn | head -60
```
- Group them into near-duplicates. Five greys within 3% of each other are one role used inconsistently.
- Note where each colour is used: as text, as a surface, as a border, or as an accent. Its role comes from its use, not its value.
## 2. Define roles
Keep the set small. Most interfaces need about this:
| Group | Roles |
|---|---|
| Surfaces | `--bg` (page), `--surface` (raised), `--surface-2` (raised twice, or pressed), `--overlay` (scrims) |
| Text | `--ink` (primary), `--ink-2` (secondary), `--ink-3` (tertiary: captions, meta), `--ink-on-accent` |
| Lines | `--line` (hairlines), `--line-strong` (inputs, focus-adjacent) |
| Accent | `--accent` (the one action colour), `--accent-soft` (its tinted background) |
| Status | `--ok`, `--warn`, `--bad` (each needs to pass as text on `--surface`) |
| Focus | `--focus` (the ring; must reach 3:1 against every surface it appears on) |
| Type | `--font-display`, `--font-sans`, `--font-mono`, and a size scale