Dark mode
How the dark theme is built, the neutral ramp and its roles, and Button, Badge, Tag, Link and status surfaces in light and dark side by side.
Version 0.1.2 · Last updated
Light is the DGA Figma theme. Dark is rebuilt from it with one set of rules, because Figma's Dark mode is incomplete and inconsistent: the "white" surface is darker than the page, a few tokens keep a light value on a dark background, and the neutral ramp is a cool blue-grey that clashes with the green brand. Every token the rebuild changes is listed under Dark theme on Deviations.
Rules
- One tinted neutral ramp.
colors-neutral-dark-25 … 950(OKLCH hue 172, chroma 0.004 to 0.016): a slight green tint that matches the brand, never flat grey or pure black. - Roles. Page 950, surface 900, raised 850, border 800, border-strong 700, text 50, secondary paragraph 300, muted 400. Each layer is lighter than the one under it.
- Colours. Text and icons use step 300 of the colour's own ramp, strong borders 500, soft and outlined borders 700 to 800. Badges, tags, status tags, alerts and featured icons sit on a soft tint: the hue of the colour's own base step at one fixed OKLCH lightness and chroma, so every hue is equally strong and none drifts to brown (amber and purple use their 400 step). Button fills keep their light value: the label on them is white in both modes and a lighter step would drop it below 4.5:1.
- Same system. Every light semantic token has a dark counterpart with the same role, so components keep the same hierarchy in both modes.
- No shadows. Elevation is a lighter surface plus a border.
- No flash. The theme class is set before first paint; the page never opens in light and switches.
- Contrast. Every dark pair is in the audit (report); the build fails on a regression.
Neutral ramp
| Step | Colour | Role | On surface 900 |
|---|---|---|---|
| 950 | #0d1311 | Page (bg) | 1.07:1 |
| 900 | #141b19 | Surface (card, sidebar) | 1.00:1 |
| 850 | #1b2421 | Raised (menu, popover) | 1.10:1 |
| 800 | #242e2a | Border | 1.24:1 |
| 700 | #37413d | Border strong | 1.65:1 |
| 600 | #4a5651 | 2.28:1 | |
| 500 | #6c7873 | 3.80:1 | |
| 400 | #939e9a | Text muted | 6.32:1 AA |
| 300 | #b6c0bd | Text secondary | 9.38:1 AAA |
| 200 | #d0d8d5 | Text primary paragraph | 12.04:1 AAA |
| 100 | #e4ebe9 | 14.45:1 AAA | |
| 50 | #f0f5f3 | Text | 15.87:1 AAA |
| 25 | #f8fbfa | 16.80:1 AAA |
Light and dark side by side
The two columns below are the same markup in a data-theme="light" and a data-theme="dark" scope, so what you see is what ships. The full per-token table, with each value and its contrast ratio, is on Colors.
Light
Surfaces: body, surface, raised
Text: default, primary paragraph, secondary paragraph
Button
Button, destructive
Badge
Badge, outlined
Tag and Status Tag
Link
Alert-like surfaces
Request submitted
You will get an SMS when it is reviewed.
Service hours
Sunday to Thursday, 8:00 to 16:00.
Document expires soon
Renew it within 14 days to avoid a fee.
Payment failed
Check the card details and try again.
Featured icon
Dark
Surfaces: body, surface, raised
Text: default, primary paragraph, secondary paragraph
Button
Button, destructive
Badge
Badge, outlined
Tag and Status Tag
Link
Alert-like surfaces
Request submitted
You will get an SMS when it is reviewed.
Service hours
Sunday to Thursday, 8:00 to 16:00.
Document expires soon
Renew it within 14 days to avoid a fee.
Payment failed
Check the card details and try again.