sisyo 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/bin/known-hashes.json +21 -0
- package/package.json +1 -1
- package/templates/.claude/skills/neon-game-ui-ux-skill/COMPONENTS.md +490 -0
- package/templates/.claude/skills/neon-game-ui-ux-skill/GAMIFICATION.md +246 -0
- package/templates/.claude/skills/neon-game-ui-ux-skill/ICONS.md +249 -0
- package/templates/.claude/skills/neon-game-ui-ux-skill/LAYOUT-NAV.md +362 -0
- package/templates/.claude/skills/neon-game-ui-ux-skill/MOTION-A11Y.md +168 -0
- package/templates/.claude/skills/neon-game-ui-ux-skill/SKILL.md +137 -0
- package/templates/.claude/skills/neon-game-ui-ux-skill/TOKENS.md +323 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neon-game-ui-ux-skill
|
|
3
|
+
description: "Neon, game-like UI/UX design system for web apps (React 18 + TypeScript + Tailwind 3 + motion): dark blue-black canvas, a few neon tones with one meaning each, glow as a signal, hexagon badges, round keycap buttons, duotone gradient icons, a HUD top bar (level, XP bar, streak, daily-goal ring), desktop side rail, mobile bottom bar with a raised centre progress dial that opens the activity modes as a radial menu, and a gamification layer (XP, levels, streak, daily path with a chest, quests, achievements, XP burst flying to the HUD, level-up modal). Guidance only, no source files: exact token values, per-component anatomy and implementation techniques, shell and dial geometry, the gamification data contract, and the icon method (Lucide base shapes, layer recipes, a generated registry). Triggers on: neon / cyber / game-like / gamified UI, 'like LenS', 'Aperture Neon', meshy-like dark UI, HUD, XP, level, streak, quests, achievements, daily goal, round buttons, radial menu, practice dial, duotone icons, or restyling a frontend in this style."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: HoangThang
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Neon Game UI/UX
|
|
11
|
+
|
|
12
|
+
A complete design system for a neon, game-like web interface, taken from a production app (LenS, "Aperture Neon";
|
|
13
|
+
visual direction studied from meshy.ai and given its own identity). Use it to build the same look and feel in another
|
|
14
|
+
project.
|
|
15
|
+
|
|
16
|
+
This skill is **guidance only**. It contains no source files: the project writes its own tokens, components, shell and
|
|
17
|
+
icon pipeline from the values, anatomy and techniques in the detail files. The numbers in those files are the system;
|
|
18
|
+
use them as written, do not approximate them. The reference stack is React 18 + TypeScript + Tailwind 3.4 +
|
|
19
|
+
`motion/react`; the rules themselves do not depend on it.
|
|
20
|
+
|
|
21
|
+
## When to trigger
|
|
22
|
+
|
|
23
|
+
- Building or restyling a frontend that should look neon / game-like / gamified, or "like LenS".
|
|
24
|
+
- Adding a HUD, XP, levels, streaks, a daily goal, quests, achievements or reward animations to an app.
|
|
25
|
+
- Building the app shell: top bar HUD, side rail, bottom bar with a centre dial / radial menu.
|
|
26
|
+
- Creating or replacing the icon set, or asked how the icons are made.
|
|
27
|
+
- Reviewing a screen in this style for contrast, motion or accessibility.
|
|
28
|
+
|
|
29
|
+
## Detail files: load only what the task needs
|
|
30
|
+
|
|
31
|
+
| File | Load when |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `TOKENS.md` | Any styling work: every colour (dark + light, RGB channels), ink-safe variants, the Tailwind mapping, tone scopes, type, radii, shadows, gradients, animations, base element rules, theme switch |
|
|
34
|
+
| `COMPONENTS.md` | Building or using a shared component (icon, buttons, cards, rings, bars, badges, path, quests, achievements, controls, toasts, reward system), the root providers or the gallery page |
|
|
35
|
+
| `LAYOUT-NAV.md` | App shell, HUD top bar, side rail, bottom bar, the centre dial and its radial menu (sizes, arc formula, states, when not to use one), responsive rules, safe areas, sheets, dialogs, skeletons |
|
|
36
|
+
| `GAMIFICATION.md` | XP, levels, streak, daily path, quests, achievements, reward moments, honesty rules, the HUD / Reward data contract and the client wiring |
|
|
37
|
+
| `ICONS.md` | The icon method: Lucide base shapes, the layer model, recipes, customisation rules, the generator and the preview sheet, the licence obligation, alternative routes, the icon checklist |
|
|
38
|
+
| `MOTION-A11Y.md` | Easing and durations, what may animate, loop budget, reduced motion, contrast targets, focus, screen readers, the review checklist |
|
|
39
|
+
|
|
40
|
+
## Design DNA: twelve rules
|
|
41
|
+
|
|
42
|
+
1. **Dark blue-black canvas.** Surfaces step from `#05060A` to `#1E2334` in small increments; never neutral grey,
|
|
43
|
+
never pure black cards. Depth = a 1 px top highlight + a soft drop shadow, not big lightness jumps.
|
|
44
|
+
2. **Few neon tones, one job each.** lime = primary / XP / correct, aqua = links / focus, iris = level, flare = new /
|
|
45
|
+
rare, amber = quests / in progress, ember = streak, gold = trophies / claimable, coral = wrong / danger. A tone
|
|
46
|
+
means the same thing on every screen.
|
|
47
|
+
3. **Glow is a signal, not decoration.** Only active, current, claimable or just-rewarded things glow. A screen at
|
|
48
|
+
rest has a handful of glows; if everything glows, nothing does.
|
|
49
|
+
4. **Hexagons for identity** (level badge, medals, quest and empty-state tiles), **circles for actions** (round
|
|
50
|
+
keycap buttons, path nodes, progress rings), **rounded rectangles (24 px) for containers**.
|
|
51
|
+
5. **Keycap buttons.** Buttons have a visible 4 px depth and travel 3 px into it when pressed. Primary = lime face
|
|
52
|
+
with dark text; neutral = dark disc with a neon ring.
|
|
53
|
+
6. **Duotone icons.** 24 px grid, 1.75 stroke, tone gradient stroke + the same gradient at 18 % as fill, at most one
|
|
54
|
+
accent (a pip or a white glint). Base shapes from one open icon family. Inactive / disabled / on-neon icons are mono.
|
|
55
|
+
7. **Three fonts with fixed roles.** Display (Chakra Petch) for headings, numbers and uppercase labels; text
|
|
56
|
+
(Be Vietnam Pro) for UI; reading (Lexend) for long passages. Numbers always `tabular-nums`.
|
|
57
|
+
8. **Numbers are alive.** Values count up, bars slide, rings draw in: once, in 600-700 ms, with the glide easing.
|
|
58
|
+
9. **Rewards land on the HUD.** An XP gain bursts from the control the user pressed and flies to the XP bar, which
|
|
59
|
+
then updates. Intensity matches rarity: chip < toast < claim glow < level-up modal.
|
|
60
|
+
10. **One primary action per view.** A single flowing-gradient CTA; everything else is secondary or ghost.
|
|
61
|
+
11. **The HUD is always there and always true.** Level, XP, streak and daily goal in the top bar on every page; all
|
|
62
|
+
values come from the server.
|
|
63
|
+
12. **Mobile first, thumb first.** A bottom bar with the core activity as a raised centre dial that doubles as
|
|
64
|
+
today's progress ring; desktop gets a side rail instead.
|
|
65
|
+
|
|
66
|
+
## Bring it to a new project: build order
|
|
67
|
+
|
|
68
|
+
Work in this order; each step has a check that must pass before the next one starts.
|
|
69
|
+
|
|
70
|
+
| # | Create | From | Check |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| 1 | **Document head**: `data-theme="dark"` + `dark` class on `<html>`, viewport with `viewport-fit=cover`, `theme-color`, `color-scheme`, the font stylesheet, the inline theme script | TOKENS.md §6, §12 | Reload with a saved light theme: no dark frame flashes |
|
|
73
|
+
| 2 | **Token stylesheet**: the dark block and the light override. Adjust tone *jobs* to the product; keep one job per hue | TOKENS.md §2-§4, §8, §9, §11 | Every variable holds RGB channels, not hex |
|
|
74
|
+
| 3 | **Tailwind theme**: colours, fonts, sizes, radius, shadows, gradients, keyframes, animations, easings | TOKENS.md §1, §6-§11 | `bg-neon-lime/10` and `text-neon-ink-lime` produce CSS |
|
|
75
|
+
| 4 | **Base stylesheet**: base element rules, shell variables, component classes, tone scopes outside any layer, the reduced-motion block | TOKENS.md §5, §10, §12; MOTION-A11Y.md §5 | `body` is `#05060A`, headings use the display font, focus rings are aqua; a **production build** still contains `.tone-gold` |
|
|
76
|
+
| 5 | **Theme hook** | COMPONENTS.md, hooks | Toggling updates every consumer and survives a reload |
|
|
77
|
+
| 6 | **Icon system**: pin Lucide, name list, recipes, generator, preview sheet, licence file, the `Icon` component | ICONS.md; COMPONENTS.md, Icon | The generator fails on a wrong node index; the preview sheet reads at 24 px in dark, light and mono |
|
|
78
|
+
| 7 | **Core components and root providers** | COMPONENTS.md | Type-check passes; each component matches its entry |
|
|
79
|
+
| 8 | **Gallery page** (development only) showing every component, state and icon | COMPONENTS.md, last section | Reviewed in both themes, at 320 px, with the keyboard, with reduced motion. Do this before any product page |
|
|
80
|
+
| 9 | **Shell**: top bar HUD, side rail, bottom bar, dial and radial menu, modal focus | LAYOUT-NAV.md | Unit tests of the arc geometry pass for 3-6 items at 320 / 360 / 390 / 768 px; the open menu fits at 320 px; Tab stays inside it |
|
|
81
|
+
| 10 | **Gamification wiring**: agree the HUD read model and the Reward object with the backend, then "play a reward" on every action that grants XP | GAMIFICATION.md §10 | A grant makes the chip land on the XP bar and the bar fill at that moment; a repeated request celebrates nothing |
|
|
82
|
+
| 11 | **Pages**: home first (path hero card, stat tiles, quests, achievements), then the rest. Every page gets a skeleton with the same boxes, an empty state and an inline error state | LAYOUT-NAV.md §5, §7 | No layout shift when data arrives |
|
|
83
|
+
| 12 | **Verify** | MOTION-A11Y.md §10 | Type-check, production build, and the review checklist on every screen |
|
|
84
|
+
|
|
85
|
+
When restyling an existing app, the namespaced colour names (`surface-*`, `ink-*`, `neon-*`) do not collide with
|
|
86
|
+
Tailwind's default palette, so pages can be migrated one at a time.
|
|
87
|
+
|
|
88
|
+
## Hard rules
|
|
89
|
+
|
|
90
|
+
| Rule | What goes wrong when it is broken |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Colour tokens are **RGB channels** (`--c-lime: 184 255 61`), mapped as `rgb(var(--c-x) / <alpha-value>)` | `bg-neon-lime/10` and every tint, ring and glow stop working; tints get hard-coded and the light theme cannot override them |
|
|
93
|
+
| Coloured **text and thin lines** use `neon-ink-*` / `--tone-ink`; fills and glows use `neon-*` / `--tone` | Light theme: neon text on white is about 1.2:1, unreadable |
|
|
94
|
+
| Text on a neon fill is `text-on-neon` (`#05060A`), never white | White on lime / gold / aqua is 1.2-3.3:1 |
|
|
95
|
+
| `ink-muted` is the floor for readable text; `ink-faint` is decoration / disabled only | Meta text drops under 4.5:1 |
|
|
96
|
+
| **Tone = meaning**, never decoration; one job per hue | Colour stops being a signal; the UI reads as a rainbow |
|
|
97
|
+
| A tone is passed with a `.tone-*` scope; never interpolate Tailwind class names (`` `bg-neon-${t}` ``) | The class is not in the source text, Tailwind purges it, production renders colourless |
|
|
98
|
+
| `.tone-*` rules stay outside `@layer` | Same purge problem for the scopes themselves |
|
|
99
|
+
| No glow on body text; glow only on active / current / claimable / rewarded | Blurred glyphs; visual noise; no hierarchy |
|
|
100
|
+
| Every state has a non-colour cue (icon, tag, text, shape) | Colour-blind and screen-reader users lose correct / wrong / new / locked |
|
|
101
|
+
| Hit areas >= **44x44 px** (extend small visuals with a pseudo-element) | Mis-taps on phones, especially in the bottom bar and chips |
|
|
102
|
+
| Visible **focus ring** everywhere: 2 px aqua, offset 2 px; drawn on the visible part of composite controls | Keyboard users are lost; glow is not a focus indicator |
|
|
103
|
+
| **Reduced motion** respected at three levels: CSS block, `MotionConfig reducedMotion="user"`, component branches | Vestibular discomfort; loops that cannot be stopped |
|
|
104
|
+
| Animate only `transform`, `opacity`, `background-position`; at most two ambient loops on screen | Jank on phones, battery drain, a restless screen |
|
|
105
|
+
| `ease-pop` (overshoot) only for rewards | Ordinary UI feels toy-like |
|
|
106
|
+
| Dialogs and overlays portal to `<body>` and use the modal-focus behaviour (LAYOUT-NAV.md §6) | They become inert with `#root`, or focus escapes behind the scrim |
|
|
107
|
+
| Game numbers come from the server; rewards are idempotent; the HUD is patched optimistically then refetched | Double payouts, a HUD that disagrees with the server, celebrations for nothing |
|
|
108
|
+
| No fake scarcity or loss-framing; rewards are shown before they are earned and paid exactly | The game layer becomes a dark pattern and users stop trusting it |
|
|
109
|
+
| Both themes are checked for every new screen | Dark-only review ships unreadable light pages |
|
|
110
|
+
|
|
111
|
+
## Minimal example
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
<GlowCard tone="lime" padding="lg" as="section">
|
|
115
|
+
<p className="font-display text-2xs font-semibold uppercase tracking-[.16em] text-ink-muted">Today</p>
|
|
116
|
+
<h2 className="mt-1.5 text-xl font-bold">2 of 4 steps done</h2>
|
|
117
|
+
<div className="mt-4 flex items-center gap-4">
|
|
118
|
+
<ProgressRing value={0.5} size={64} label="Daily goal">
|
|
119
|
+
<span className="font-display text-sm font-bold tabular-nums text-neon-ink-lime">50%</span>
|
|
120
|
+
</ProgressRing>
|
|
121
|
+
<NeonButton size="lg" iconRight="next" to="/play">Continue</NeonButton>
|
|
122
|
+
<RoundButton icon="mic" tone="flare" aria-label="Voice mode" to="/voice" />
|
|
123
|
+
</div>
|
|
124
|
+
</GlowCard>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
What makes it "this style": the card's corner tint and edge highlight, an uppercase display-font label in muted ink,
|
|
128
|
+
a ring with ink-safe coloured text, one flowing CTA, one toned round button with a real accessible name.
|
|
129
|
+
|
|
130
|
+
## Notes
|
|
131
|
+
|
|
132
|
+
- The components in the example are names from `COMPONENTS.md`; each project implements them itself. Class and token
|
|
133
|
+
names (`.neon-card`, `ease-glide`, `tone-*`) are the ones the guides use; rename them consistently or not at all.
|
|
134
|
+
- Product-specific pieces are described as patterns, not as components: the logo / app mark, the account menu, state
|
|
135
|
+
chips and the split control.
|
|
136
|
+
- The icon registry is generated from recipes over Lucide shapes. Path data derived from Lucide carries its ISC
|
|
137
|
+
licence text with it (`ICONS.md` §7).
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# Tokens
|
|
2
|
+
|
|
3
|
+
Every value of the neon game UI: what it is, what it is for, and how it reaches the markup. The numbers on this page
|
|
4
|
+
are the system; type them into the project's own token file, theme config and base stylesheet. Do not approximate
|
|
5
|
+
them: the contrast figures in `MOTION-A11Y.md` were measured on exactly these values.
|
|
6
|
+
|
|
7
|
+
Names used here (`--c-*`, `surface-*`, `ink-*`, `neon-*`, `.neon-card`, `ease-glide`, ...) are the names the other
|
|
8
|
+
guides refer to. A project may rename them, but then it renames them everywhere.
|
|
9
|
+
|
|
10
|
+
## 1. How the layers fit
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
token file --c-lime: 184 255 61 RGB CHANNELS, one set per theme
|
|
14
|
+
Tailwind theme neon.lime = rgb(var(--c-lime) / <alpha-value>)
|
|
15
|
+
markup bg-neon-lime/10 ring-neon-lime/50 text-neon-ink-lime
|
|
16
|
+
tone scope .tone-lime { --tone: var(--c-lime); --tone-ink: var(--c-lime-ink) }
|
|
17
|
+
component shadow-[0_0_16px_rgb(var(--tone)/.28)] text-[rgb(var(--tone-ink))]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Three files carry it:
|
|
21
|
+
|
|
22
|
+
1. **A token stylesheet**: CSS custom properties under `:root, [data-theme='dark']` (the default) and a second block
|
|
23
|
+
under `[data-theme='light']` that overrides only what differs. Each block also sets `color-scheme` (`dark` /
|
|
24
|
+
`light`); the icon gradients depend on it (ICONS.md §2).
|
|
25
|
+
2. **The Tailwind theme** (`theme.extend`, Tailwind 3.4): colours mapped from the variables, plus fonts, sizes, radii,
|
|
26
|
+
shadows, gradients, keyframes, animations and easings from the tables below.
|
|
27
|
+
`darkMode: ['class', '[data-theme="dark"]']`.
|
|
28
|
+
3. **A base stylesheet**: imports the tokens, then `@tailwind base / components / utilities`, base element rules (§12),
|
|
29
|
+
the component classes (§10), the tone scopes (§5) and the reduced-motion block (MOTION-A11Y.md §5).
|
|
30
|
+
|
|
31
|
+
**Why channels, not hex.** `--c-lime: #B8FF3D` would make `bg-neon-lime/10` impossible: Tailwind builds
|
|
32
|
+
`rgb(var(--c-lime) / 0.1)`, and that only parses when the variable holds `184 255 61`. The whole look is built from
|
|
33
|
+
low-alpha tints of a few hues (a 10 % face, a 45 % ring, a 22 % glow), so alpha on every colour is a hard
|
|
34
|
+
requirement. With hex, every tint becomes a new hard-coded colour and the light theme can no longer override it.
|
|
35
|
+
|
|
36
|
+
**Why namespaced colour names.** `surface-*`, `ink-*`, `neon-*`, `neon-ink-*`, `line` never collide with Tailwind's
|
|
37
|
+
`slate` / `indigo` palette. An existing project can adopt the theme one page at a time while old pages keep working.
|
|
38
|
+
|
|
39
|
+
Mapping into Tailwind, in full (a helper `c = (name) => 'rgb(var(--c-' + name + ') / <alpha-value>)'`):
|
|
40
|
+
|
|
41
|
+
| Tailwind colour | Keys → variable |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `surface` | `void` → `--c-void`, `base` → `--c-base`, `1` → `--c-surface`, `2` → `--c-raised`, `3` → `--c-shade` |
|
|
44
|
+
| `line` | `DEFAULT` → `--c-line`, `strong` → `--c-line-strong` |
|
|
45
|
+
| `ink` | `title` → `--c-title`, `DEFAULT` → `--c-body`, `soft` → `--c-soft`, `muted` → `--c-muted`, `faint` → `--c-faint` |
|
|
46
|
+
| `neon` | `lime aqua iris flare amber ember gold coral info` → `--c-<name>` |
|
|
47
|
+
| `neon-ink` | the same nine → `--c-<name>-ink` |
|
|
48
|
+
| `on-neon` | the literal `#05060A` (not a variable: it is the same in both themes) |
|
|
49
|
+
|
|
50
|
+
## 2. Surfaces and lines
|
|
51
|
+
|
|
52
|
+
| Variable | Tailwind | Dark (channels) | Light (channels) | Use |
|
|
53
|
+
|---|---|---|---|---|
|
|
54
|
+
| `--c-void` | `surface-void` | `#05060A` (5 6 10) | `#EEF1F8` (238 241 248) | App backdrop (`body`), modal scrims (`bg-surface-void/80`) |
|
|
55
|
+
| `--c-base` | `surface-base` | `#0A0C14` (10 12 20) | `#F4F6FB` (244 246 251) | Top bar, side rail, bottom bar (used at 70-85 % + blur) |
|
|
56
|
+
| `--c-surface` | `surface-1` | `#10131D` (16 19 29) | `#FFFFFF` (255 255 255) | Cards, pills, sheets |
|
|
57
|
+
| `--c-raised` | `surface-2` | `#161A27` (22 26 39) | `#ECEFF7` (236 239 247) | Hover, popovers, inputs, dark button discs, toasts |
|
|
58
|
+
| `--c-shade` | `surface-3` | `#1E2334` (30 35 52) | `#E2E7F1` (226 231 241) | Progress tracks, pressed, selected segment, skeletons |
|
|
59
|
+
| `--c-line` | `line` | `#262C40` (38 44 64) | `#D9DEEA` (217 222 234) | Hairline borders, dividers |
|
|
60
|
+
| `--c-line-strong` | `line-strong` | `#353D57` (53 61 87) | `#BEC6D8` (190 198 216) | Hover borders, locked rings, scrollbar thumb |
|
|
61
|
+
|
|
62
|
+
The dark ladder is a cool blue-black, never neutral grey: neon hues look dirty on grey and clean on blue-black. Each
|
|
63
|
+
step is only a few lightness points above the previous one; depth comes from the 1 px top highlight in `shadow-edge`,
|
|
64
|
+
not from big brightness jumps.
|
|
65
|
+
|
|
66
|
+
## 3. Ink (text)
|
|
67
|
+
|
|
68
|
+
| Variable | Tailwind | Dark | Light | Contrast on a dark card | Use |
|
|
69
|
+
|---|---|---|---|---|---|
|
|
70
|
+
| `--c-title` | `text-ink-title` | `#F4F7FF` (244 247 255) | `#0B0E17` (11 14 23) | 17.3:1 | Headings, values, active labels |
|
|
71
|
+
| `--c-body` | `text-ink` | `#D5DAE8` (213 218 232) | `#262C3D` (38 44 61) | 13.3:1 | Body text (the `body` default) |
|
|
72
|
+
| `--c-soft` | `text-ink-soft` | `#A3ACC4` (163 172 196) | `#4A5268` (74 82 104) | 8.2:1 | Secondary text, inactive navigation |
|
|
73
|
+
| `--c-muted` | `text-ink-muted` | `#8089A6` (128 137 166) | `#5E6781` (94 103 129) | 5.3:1 | Meta text, captions, uppercase labels. **The floor for anything that must be read** (>= 4.5:1 on every dark layer, 4.50 on `shade`) |
|
|
74
|
+
| `--c-faint` | `text-ink-faint` | `#4D5573` (77 85 115) | `#A3AABB` (163 170 187) | 2.5:1 | Disabled and decorative only. Never for information |
|
|
75
|
+
|
|
76
|
+
## 4. Neon tones: one job per hue
|
|
77
|
+
|
|
78
|
+
The neon value is **the same in both themes**; only its `-ink` variant changes.
|
|
79
|
+
|
|
80
|
+
| Tone | `--c-<tone>` (both themes) | `--c-<tone>-ink` on light | Neon on a dark card | Default job |
|
|
81
|
+
|---|---|---|---|---|
|
|
82
|
+
| lime | `#B8FF3D` (184 255 61) | `#3D7A00` (61 122 0) | 15.4:1 | Primary: XP, progress, correct, selected, primary CTA |
|
|
83
|
+
| aqua | `#3DF5D8` (61 245 216) | `#00786A` (0 120 106) | 13.5:1 | Links, keyboard focus, "known / safe" state, secondary currency |
|
|
84
|
+
| iris | `#8B7BFF` (139 123 255) | `#5A45EE` (90 69 238) | 5.6:1 | Level; "the system is thinking" |
|
|
85
|
+
| flare | `#FF4FD8` (255 79 216) | `#B8129A` (184 18 154) | 6.5:1 | New, rare; "the system is speaking" |
|
|
86
|
+
| amber | `#FFB23E` (255 178 62) | `#965400` (150 84 0) | 10.3:1 | Quests, "in progress", warnings, streak at risk |
|
|
87
|
+
| ember | `#FF6A2B` (255 106 43) | `#C2410C` (194 65 12) | 6.5:1 | Streak |
|
|
88
|
+
| gold | `#FFD65A` (255 214 90) | `#8A6200` (138 98 0) | 13.3:1 | Trophies, mastered, claimable rewards |
|
|
89
|
+
| coral | `#FF5C7A` (255 92 122) | `#CC1A40` (204 26 64) | 6.2:1 | Wrong, danger, destructive |
|
|
90
|
+
| info | `#5AA8FF` (90 168 255) | `#005EC7` (0 94 199) | 7.5:1 | Informational (no tone scope; used directly) |
|
|
91
|
+
|
|
92
|
+
On dark, every `-ink` variable is an alias: `--c-lime-ink: var(--c-lime)`. The light block replaces the nine `-ink`
|
|
93
|
+
values with the dark stops above and leaves the neon values untouched.
|
|
94
|
+
|
|
95
|
+
Two more plain variables: `--on-neon: #05060A` (text and icons on any neon fill) and `--comet-head` (the bright head
|
|
96
|
+
of the XP fill: `#fff` on dark, `rgb(var(--c-lime-ink))` on light).
|
|
97
|
+
|
|
98
|
+
Re-assign the jobs for another product (a fitness app might give ember to "calories"), but keep the rule: **a hue
|
|
99
|
+
means one thing everywhere**. When lime is both "correct" and "decorative divider", the user stops reading colour as a
|
|
100
|
+
signal and the interface degrades into a rainbow.
|
|
101
|
+
|
|
102
|
+
### The two colour families: `neon-*` and `neon-ink-*`
|
|
103
|
+
|
|
104
|
+
- `neon-*` (`bg-neon-lime`, `ring-neon-lime/50`, `shadow-[..rgb(var(--c-lime)/.4)]`): **fills, rings, glows, tints**.
|
|
105
|
+
- `neon-ink-*` (`text-neon-ink-lime`, `rgb(var(--c-lime-ink))`): **coloured text and thin strokes**. On dark it equals
|
|
106
|
+
the neon; on light it is the dark stop (5.2-6.0:1 on white).
|
|
107
|
+
|
|
108
|
+
Rule: *if it is a glyph or a line under 3 px that carries meaning, use `-ink`.* Neon lime text on a white card is
|
|
109
|
+
1.2:1, invisible. This is the most common way the light theme breaks. The same applies to progress-ring arcs (their
|
|
110
|
+
gradient is built from `-ink` variables), the XP fill (`bg-comet` uses `--c-lime-ink`), gradient text
|
|
111
|
+
(`bg-flare-ink bg-clip-text text-transparent`), the fill of thin progress bars, and icon gradients (each stop has a
|
|
112
|
+
light value, ICONS.md §2).
|
|
113
|
+
|
|
114
|
+
Text **on** a neon fill always uses `text-on-neon` (`#05060A`, 6.2-16.8:1). White on neon is 1.2-3.3:1 and fails.
|
|
115
|
+
The only tolerated exception is white bold text >= 24 px on iris.
|
|
116
|
+
|
|
117
|
+
## 5. Tone scopes: passing a colour to a component
|
|
118
|
+
|
|
119
|
+
```css
|
|
120
|
+
.tone-lime { --tone: var(--c-lime); --tone-ink: var(--c-lime-ink); }
|
|
121
|
+
/* aqua, iris, flare, amber, ember, gold, coral: the same pattern */
|
|
122
|
+
.tone-mono { --tone: var(--c-soft); --tone-ink: var(--c-body); }
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
A component takes a `tone` prop (`lime | aqua | iris | flare | amber | ember | gold | coral | mono`), adds
|
|
126
|
+
`` `tone-${tone}` `` to its root and writes its styles once against `--tone` / `--tone-ink`:
|
|
127
|
+
|
|
128
|
+
```tsx
|
|
129
|
+
<div className={cn('neon-card neon-glow', `tone-${tone}`)}>
|
|
130
|
+
<span className="bg-[rgb(var(--tone)/.10)] ring-1 ring-inset ring-[rgb(var(--tone)/.25)]" />
|
|
131
|
+
<span className="text-[rgb(var(--tone-ink))]">days</span>
|
|
132
|
+
</div>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Non-obvious details:
|
|
136
|
+
|
|
137
|
+
- The `.tone-*` rules sit **outside any `@layer`** in the base stylesheet. The class name is built at runtime, so
|
|
138
|
+
Tailwind's content scan never sees the full string; inside `@layer components` the rules would be purged from the
|
|
139
|
+
production CSS and every toned component would render colourless (while still looking right in development).
|
|
140
|
+
- For the same reason never build other class names by interpolation (`` `bg-neon-${tone}` `` is purged). Use the tone
|
|
141
|
+
scope + arbitrary values, or a lookup table of complete class strings.
|
|
142
|
+
- The scope cascades: a card with `tone-gold` tints every `rgb(var(--tone))` inside it. Set the scope on the smallest
|
|
143
|
+
element that needs it.
|
|
144
|
+
- Use `var(--tone, var(--c-lime))` when a component must also work without a scope (the hover glow of a card).
|
|
145
|
+
|
|
146
|
+
## 6. Typography
|
|
147
|
+
|
|
148
|
+
| Family | Tailwind | Stack | Weights loaded | Use |
|
|
149
|
+
|---|---|---|---|---|
|
|
150
|
+
| Display | `font-display` | `"Chakra Petch", "Be Vietnam Pro", sans-serif` | 500 600 700 | Headings (`h1`-`h3` get it from the base rules), **all numbers**, uppercase labels, round-button captions, the CTA, tags |
|
|
151
|
+
| Text | `font-sans` | `"Be Vietnam Pro", Inter, system-ui, sans-serif` | 400 500 600 700 | UI text, paragraphs, form fields |
|
|
152
|
+
| Reading | `font-read` | `Lexend, "Be Vietnam Pro", sans-serif` | 400 500 | Long passages the user reads for minutes: 18 px / 1.75, max 68ch |
|
|
153
|
+
| Mono | `font-mono` | `"JetBrains Mono", ui-monospace, monospace` | 500 | Versions, tokens, gallery captions |
|
|
154
|
+
|
|
155
|
+
Load the four families with one stylesheet link and `display=swap`, after `preconnect` hints to the font host. All
|
|
156
|
+
four cover Vietnamese. If the product needs another script (Japanese, Korean, Arabic), replace **the text font** with
|
|
157
|
+
one that covers it and keep Chakra Petch for digits and Latin labels only; a squared display font with fallback
|
|
158
|
+
glyphs for half the characters looks broken.
|
|
159
|
+
|
|
160
|
+
Scale used by the components:
|
|
161
|
+
|
|
162
|
+
| Role | Classes |
|
|
163
|
+
|---|---|
|
|
164
|
+
| Stat value | `font-display text-3xl font-bold leading-none tabular-nums text-ink-title` |
|
|
165
|
+
| Page / card title | `text-xl sm:text-2xl font-bold` (h2), `text-base font-semibold` (card header) |
|
|
166
|
+
| Uppercase label | `font-display text-2xs font-semibold uppercase tracking-[.14em] text-ink-muted` |
|
|
167
|
+
| Round button caption | `font-display text-xs font-semibold uppercase tracking-[.08em]` (the quest Claim keycap uses the same style in bold). Text buttons do **not** use it: COMPONENTS.md, NeonButton |
|
|
168
|
+
| HUD number | `font-display text-[11px] font-semibold tracking-[.04em] tabular-nums` |
|
|
169
|
+
| Body | `text-sm` / `text-[15px]`, line-height 1.5 |
|
|
170
|
+
| Meta | `text-xs text-ink-muted` |
|
|
171
|
+
|
|
172
|
+
Two sizes are added to Tailwind's scale: `text-2xs` = 0.625 rem (10 px) with line-height 0.875 rem, and `text-3xs` =
|
|
173
|
+
0.5625 rem (9 px) with line-height 0.75 rem (labels inside badges only).
|
|
174
|
+
|
|
175
|
+
Numbers that change always carry `tabular-nums`, or the HUD jitters as digits change width.
|
|
176
|
+
|
|
177
|
+
## 7. Radii and shape
|
|
178
|
+
|
|
179
|
+
| Shape | Value | Use |
|
|
180
|
+
|---|---|---|
|
|
181
|
+
| `rounded-full` | circle / pill | Round buttons, chips, pills, tracks, segmented control |
|
|
182
|
+
| `rounded-xl` | 12 px | Small controls (`sm` buttons, icon tiles, toast action) |
|
|
183
|
+
| `rounded-2xl` | 16 px | Buttons `md` / `lg`, navigation items, toasts |
|
|
184
|
+
| `rounded-3xl` | 24 px | Cards (`.neon-card`), popovers |
|
|
185
|
+
| `rounded-4xl` | 28 px (`1.75rem`, added to the theme) | Sheets, the login panel |
|
|
186
|
+
| `.hex` | `clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%)` | Level badge, achievement medals, quest and empty-state tiles |
|
|
187
|
+
|
|
188
|
+
The hexagon is pointy-top with width : height about 0.87: 28x32, 34x38, 40x44, 56x64, 140x160 px are the sizes in use.
|
|
189
|
+
|
|
190
|
+
`clip-path` clips `box-shadow`, so a hexagon **glows with `filter: drop-shadow(...)` on a wrapper element**, and its
|
|
191
|
+
**border is a second, smaller hexagon**: the outer hex is painted in the border colour, an inner `.hex` inset by
|
|
192
|
+
1.5 px is painted in the face colour.
|
|
193
|
+
|
|
194
|
+
## 8. Shadows and glows
|
|
195
|
+
|
|
196
|
+
| Token | Value | Use |
|
|
197
|
+
|---|---|---|
|
|
198
|
+
| `shadow-edge` (`--shadow-edge`) | dark: `inset 0 1px 0 rgb(255 255 255/.06), 0 24px 60px rgb(0 0 0/.35)`; light: `inset 0 1px 0 rgb(255 255 255/.9), 0 1px 2px rgb(16 24 40/.06), 0 12px 32px rgb(16 24 40/.08)` | Every card and popover: top highlight + depth |
|
|
199
|
+
| `shadow-glow-sm` | `0 0 10px rgb(lime/.25)` | Small lime tags |
|
|
200
|
+
| `shadow-glow` | `0 0 18px rgb(lime/.40)` | XP fill, selected chip, XP chip |
|
|
201
|
+
| `shadow-glow-lg` | `0 0 28px 2px rgb(lime/.40), 0 8px 30px rgb(lime/.25)` | Hero CTA only |
|
|
202
|
+
| `shadow-glow-<tone>` | `0 0 18px rgb(tone/α)`: aqua .40, iris .45, flare .40, amber .45, ember .50, gold .45, coral .45 | The same glow in another tone |
|
|
203
|
+
| `shadow-ring-lime` | `inset 0 0 0 1.5px rgb(lime/.85)` | Selected outline |
|
|
204
|
+
| `shadow-keycap` | `inset 0 1px 0 rgb(255 255 255/.10), 0 4px 0 rgb(0 0 0/.45)` | Dark keycap button: a 4 px solid "depth" under it |
|
|
205
|
+
| `shadow-keycap-lime` | `inset 0 1px 0 rgb(255 255 255/.6), 0 4px 0 #3F6E00, 0 0 22px rgb(lime/.45)` | Lime keycap: dark-lime depth + glow |
|
|
206
|
+
| `shadow-pressed` | `inset 0 1px 0 rgb(255 255 255/.10), 0 1px 0 rgb(0 0 0/.45)` | Pressed keycap: depth collapses to 1 px while the face moves down 3 px |
|
|
207
|
+
|
|
208
|
+
(`rgb(lime/α)` stands for `rgb(var(--c-lime) / α)`.)
|
|
209
|
+
|
|
210
|
+
Neon ring recipe of the round button (`neon` variant; per tone, via the scope):
|
|
211
|
+
`inset 0 0 0 1.5px rgb(var(--tone)/.75), 0 0 16px rgb(var(--tone)/.28), 0 4px 0 rgb(0 0 0/.45)`. A ring is an **inset
|
|
212
|
+
box-shadow**, not a border: it does not change the element's size and it can share one `box-shadow` list with the glow
|
|
213
|
+
and the depth, so all three transition together.
|
|
214
|
+
|
|
215
|
+
Navigation items use the same technique with their own values and **no depth shadow** (they are flat, not keycaps):
|
|
216
|
+
the rail item and the bottom-bar pill are given in LAYOUT-NAV.md §3 and §4.
|
|
217
|
+
|
|
218
|
+
Glow budget: a glow is a **signal** (active, current, claimable, just rewarded). A screen at rest shows the glow of
|
|
219
|
+
the active navigation item, the XP fill, the current step, and nothing else. Never put a glow on body text
|
|
220
|
+
(`text-shadow` blurs glyph edges and lowers legibility) and never on every card.
|
|
221
|
+
|
|
222
|
+
## 9. Gradients (`backgroundImage`)
|
|
223
|
+
|
|
224
|
+
| Class | Value | Use |
|
|
225
|
+
|---|---|---|
|
|
226
|
+
| `bg-flare` | `linear-gradient(120deg, lime 0%, aqua 38%, iris 72%, flare 100%)` | The brand spectrum: rare tier, brand marks |
|
|
227
|
+
| `bg-flare-ink` | the same from the four `-ink` variables | Gradient **text** (`bg-clip-text text-transparent`), readable on light |
|
|
228
|
+
| `bg-cta` | `linear-gradient(150deg, #E6FF9C 0%, lime 40%, aqua 100%)` | Primary CTA face; with `bg-[length:200%_200%] animate-flow` it drifts |
|
|
229
|
+
| `bg-lime-face` | `linear-gradient(160deg, #E6FF9C, lime 55%, #7EE000)` | Lime keycap discs, "done" nodes |
|
|
230
|
+
| `bg-iris` | `linear-gradient(135deg, iris, flare)` | Level badge |
|
|
231
|
+
| `bg-ember` | `linear-gradient(180deg, #FFE27A, #FF9B3D 55%, #FF4D3D)` | Flame fills |
|
|
232
|
+
| `bg-gold` | `linear-gradient(160deg, #FFF2B0, gold 50%, #E0A21F)` | Claim button, gold tier |
|
|
233
|
+
| `bg-comet` | `linear-gradient(90deg, rgb(lime-ink/.15), rgb(lime-ink) 82%, var(--comet-head))` | XP fill: a tail that brightens to a white head (a lime-ink head on light, where a white head vanishes on the pale track) |
|
|
234
|
+
| `bg-sheen` | `linear-gradient(118deg, transparent 30%, rgb(255 255 255/.14) 50%, transparent 70%)` | Skeleton and reward sheen, moved by `animate-shimmer` |
|
|
235
|
+
| `bg-glass` | `linear-gradient(rgb(255 255 255/.03), rgb(255 255 255/.01))` | Card face (part of `.neon-card`) |
|
|
236
|
+
| `bg-grid` | two 1 px `line` gradients, one `to right`, one `to bottom` (`rgb(line) 1px, transparent 1px`) | Backdrop grid, sized `48px 48px` |
|
|
237
|
+
| `bg-backdrop` | `var(--neon-backdrop)` | The static "bokeh" lights below |
|
|
238
|
+
|
|
239
|
+
`--neon-backdrop`, dark: three radial gradients, each fading to transparent at 70 %:
|
|
240
|
+
`ellipse 80% 55% at 50% -8%` lime at 10 %, `600px 380px at 92% 12%` iris at 10 %, `520px 360px at 6% 88%` aqua at 7 %.
|
|
241
|
+
Light: only the first one, lime at 18 %.
|
|
242
|
+
|
|
243
|
+
Tier faces that are not theme tokens: bronze `linear-gradient(160deg, #E0A070, #9A5B2E)`, silver
|
|
244
|
+
`linear-gradient(160deg, #E6ECF5, #9AA6BD)`.
|
|
245
|
+
|
|
246
|
+
## 10. Component classes (base stylesheet)
|
|
247
|
+
|
|
248
|
+
| Class | Definition |
|
|
249
|
+
|---|---|
|
|
250
|
+
| `.neon-backdrop` | `pointer-events: none; position: fixed; inset: 0; z-index: -10; background: var(--neon-backdrop)`. Its `::after` covers it with `bg-grid` at `48px 48px`, opacity .3, masked by `linear-gradient(#000, transparent 70%)` so the grid fades out downwards. Render **once**, in the shell. It is a static gradient: no blur filter, no animation, so it costs nothing while scrolling |
|
|
251
|
+
| `.neon-card` | `position: relative; border-radius: 24px; border: 1px solid line; background: surface-1 + bg-glass; box-shadow: shadow-edge` |
|
|
252
|
+
| `.neon-glow` | Replaces the card's background image with `radial-gradient(240px 150px at 100% 0%, rgb(var(--tone)/.14), transparent 70%)` over the glass gradient: a tinted top-right corner. Needs a `.tone-*` scope |
|
|
253
|
+
| `.neon-sweep` | A rotating spectral ring drawn 3 px outside the element. The element gets `position: relative; isolation: isolate`; its `::before` has `inset: -3px; padding: 3px; border-radius: inherit; pointer-events: none`, a `conic-gradient(from var(--neon-angle), lime, aqua, iris, rgb(lime/.15) 70%, lime)` background, and a two-layer mask (`linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)` composited with `exclude` / `-webkit-mask-composite: xor`) that leaves only the 3 px padding band visible. `animation: neon-spin 6s linear infinite`, whose only keyframe is `to { --neon-angle: 360deg }` |
|
|
254
|
+
| `.hex` | The hexagon clip-path (§7) |
|
|
255
|
+
|
|
256
|
+
`--neon-angle` must be registered, or the browser cannot interpolate it and the ring jumps instead of turning:
|
|
257
|
+
|
|
258
|
+
```css
|
|
259
|
+
@property --neon-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The component classes go in `@layer components`; they are written out in markup, so Tailwind keeps them.
|
|
263
|
+
|
|
264
|
+
## 11. Motion tokens
|
|
265
|
+
|
|
266
|
+
| Token | Value | Use |
|
|
267
|
+
|---|---|---|
|
|
268
|
+
| `ease-glide` / `--ease-glide` | `cubic-bezier(.22, 1, .36, 1)` | Everything that enters or moves |
|
|
269
|
+
| `ease-pop` / `--ease-pop` | `cubic-bezier(.34, 1.56, .64, 1)` | Rewards only (overshoot) |
|
|
270
|
+
| `--ease-std` | `cubic-bezier(.4, 0, .2, 1)` | Plain colour fades |
|
|
271
|
+
|
|
272
|
+
`ease-glide` and `ease-pop` are added to Tailwind's `transitionTimingFunction`. Which easing and duration goes with
|
|
273
|
+
which kind of change: `MOTION-A11Y.md` §1.
|
|
274
|
+
|
|
275
|
+
| Animation class | Keyframes | Timing |
|
|
276
|
+
|---|---|---|
|
|
277
|
+
| `animate-glow-pulse` | opacity .5 ↔ 1, scale 1 ↔ 1.1 | 2.4 s ease-in-out infinite. Halo behind an active toggle or a claimable button: on a blurred sibling, never on the control |
|
|
278
|
+
| `animate-float` | translateY 0 ↔ -4 px | 2.4 s ease-in-out infinite |
|
|
279
|
+
| `animate-float-3` | the same keyframes | 2.4 s, **3 iterations**, then rest. "START" tag, at-risk flame |
|
|
280
|
+
| `animate-shimmer` | translateX -120 % → 260 % | 2.2 s glide, infinite. Skeleton sheen, a reward waiting to be claimed |
|
|
281
|
+
| `animate-shimmer-once` | the same keyframes | 1.6 s glide, delay .4 s, `both`, once. One sweep per XP change |
|
|
282
|
+
| `animate-flow` | background-position `0% 0%` ↔ `100% 100%` | 5 s ease-in-out infinite. CTA gradient drift |
|
|
283
|
+
| `animate-pop-in` | 0 %: opacity 0, scale .6 → 60 %: opacity 1, scale 1.08 → 100 %: scale 1 | .45 s `ease-pop`, `both`. Check marks, new badges, ready chest |
|
|
284
|
+
| `animate-xp-burst` | 0 %: opacity 0, `translate(0,0) scale(.3)` → 15 %: opacity 1 → 100 %: opacity 0, `translate(var(--dx, 0px), var(--dy, -48px)) scale(1)` | .6 s glide, `forwards`. Burst dots; set `--dx` / `--dy` inline per dot |
|
|
285
|
+
| `animate-iris-open` | opacity 0, `rotate(-60deg) scale(.4)` → opacity 1, `rotate(0) scale(1)` | .7 s glide, `both`. Level-up badge |
|
|
286
|
+
| `animate-orb-breathe` | scale .97 ↔ 1.03, brightness 1 ↔ 1.15 | 4 s ease-in-out infinite. An idle "live" orb |
|
|
287
|
+
| `animate-ripple` | scale .85 → 1.45, opacity .8 → 0 | 2.4 s glide, infinite. Rings around a live source (speaking, recording) |
|
|
288
|
+
|
|
289
|
+
When each may run, and the loop budget: `MOTION-A11Y.md` §4.
|
|
290
|
+
|
|
291
|
+
## 12. Base element rules
|
|
292
|
+
|
|
293
|
+
| Rule | Value | Why |
|
|
294
|
+
|---|---|---|
|
|
295
|
+
| Shell variables on `:root` | `--shell-top: calc(3.5rem + 1px)`; `--shell-bottom: calc(4rem + env(safe-area-inset-bottom))`, and `0px` from 1024 px | The heights of the sticky top bar and the fixed bottom bar; see LAYOUT-NAV.md §1 |
|
|
296
|
+
| `html` | `-webkit-tap-highlight-color: transparent`; `text-size-adjust: 100%`; `scroll-padding-top: calc(var(--shell-top) + .5rem)`; `scroll-padding-bottom: calc(var(--shell-bottom) + var(--page-bar, 0px) + .5rem)` | Focus and anchor scrolling stop clear of the bars |
|
|
297
|
+
| `body` | `min-height: 100vh` (`min-h-screen`), `bg-surface-void`, `font-sans`, `text-ink`, antialiased, line-height 1.5 | |
|
|
298
|
+
| `h1, h2, h3` | `font-display`, `text-ink-title`, `text-wrap: balance` | |
|
|
299
|
+
| `a` | `color: rgb(var(--c-aqua-ink))` | Aqua = links |
|
|
300
|
+
| `:focus-visible` | `outline: 2px solid rgb(var(--c-aqua-ink)); outline-offset: 2px` | One focus colour everywhere |
|
|
301
|
+
| `::selection` | background `rgb(var(--c-lime) / .3)`, colour `rgb(var(--c-title))` | |
|
|
302
|
+
| Scrollbars | `scrollbar-width: thin`; `scrollbar-color: rgb(var(--c-line-strong)) transparent`; WebKit: 8 px, transparent track, `line-strong` thumb with a 2 px transparent border and 8 px radius, `muted` on hover | A default light scrollbar is a white stripe on the dark canvas |
|
|
303
|
+
|
|
304
|
+
### Theme switch without a flash
|
|
305
|
+
|
|
306
|
+
- `<html lang data-theme="dark" class="dark">` in the static HTML; dark is the default.
|
|
307
|
+
- An **inline script in `<head>`**, before any stylesheet or bundle: read `localStorage.theme` inside try/catch; if it
|
|
308
|
+
is `light`, set `data-theme="light"`, remove the `dark` class and set the `theme-color` meta to `#EEF1F8`. Because
|
|
309
|
+
it runs before first paint, a returning light-theme user never sees a dark frame.
|
|
310
|
+
- Meta tags: `viewport` with `viewport-fit=cover` (safe-area insets), `theme-color` `#05060A`, `color-scheme`
|
|
311
|
+
`dark light`.
|
|
312
|
+
- At runtime the DOM attribute is the source of truth (COMPONENTS.md, hooks).
|
|
313
|
+
|
|
314
|
+
## 13. Changing the palette for another brand
|
|
315
|
+
|
|
316
|
+
1. Keep the structure: 7 surfaces, 5 inks, 8 tones + info, each tone with an `-ink`.
|
|
317
|
+
2. Pick the new primary and put it in lime's **role**. If the variable is renamed, rename it everywhere: the theme
|
|
318
|
+
mapping, the base stylesheet, the icon gradient table, and the hard-coded keycap colours that belong to lime
|
|
319
|
+
(`#3F6E00` depth, `#7EE000` and `#E6FF9C` face stops; gold's Claim button uses `#8A6200` as its depth).
|
|
320
|
+
3. For every tone compute contrast: the neon on `#10131D` >= 4.5:1 for text use; `--on-neon` on the neon >= 4.5:1; the
|
|
321
|
+
`-ink` stop on `#FFFFFF` >= 4.5:1 and on the light `--c-raised` >= 4.5:1.
|
|
322
|
+
4. Update the icon gradients (3 stops per tone, a dark and a light colour each, plus the glow channels: ICONS.md §2).
|
|
323
|
+
5. Open the gallery page in both themes before touching any product page.
|