Accessibility
Nyxwire guarantees what a palette can guarantee: every color meant for text is readable on the backgrounds it is meant for, in every flavor. The rest (focus, keyboard, motion, layout) is built into the components and is yours to keep when you compose them.
Contrast gate
Section titled “Contrast gate”pnpm check:contrast runs the palette gate and exits with an error on any failure, so a color that drops below its threshold cannot be released. The table recomputes the WCAG 2.x rules from the published palette when this site is built. Each cell shows the weakest pair the rule covers.
| Rule | Minimum | Abyss | Nocturne | Twilight | Lumen |
|---|---|---|---|---|---|
text on crust, mantle, base, surface0 | 7.0:1 | 16.15 passtext on surface0 | 15.01 passtext on surface0 | 12.62 passtext on surface0 | 11.53 passtext on crust |
text on surface1, surface2 | 4.5:1 | 12.72 passtext on surface2 | 11.36 passtext on surface2 | 9.20 passtext on surface2 | 10.12 passtext on surface2 |
subtext1 on crust, mantle, base, surface0 | 4.5:1 | 12.09 passsubtext1 on surface0 | 11.33 passsubtext1 on surface0 | 9.72 passsubtext1 on surface0 | 7.48 passsubtext1 on crust |
subtext0 on crust, mantle, base | 4.5:1 | 9.21 passsubtext0 on base | 9.02 passsubtext0 on base | 8.04 passsubtext0 on base | 5.29 passsubtext0 on crust |
overlay2 on base | 3.0:1 | 5.39 passoverlay2 on base | 5.65 passoverlay2 on base | 5.32 passoverlay2 on base | 4.65 passoverlay2 on base |
overlay1 on base, mantle | 3.0:1 | 3.57 passoverlay1 on base | 3.73 passoverlay1 on base | 3.71 passoverlay1 on base | 3.12 passoverlay1 on mantle |
overlay0 on base | 1.4:1 | 2.00 passoverlay0 on base | 2.09 passoverlay0 on base | 2.15 passoverlay0 on base | 1.78 passoverlay0 on base |
each accent on crust, mantle, base, surface0 | 4.5:1 | 6.15 passalarm on surface0 | 5.62 passalarm on surface0 | 4.67 passalarm on surface0 | 4.60 passflare on crust |
on-accent on each accent | 4.5:1 | 6.92 passcrust on alarm | 6.71 passcrust on alarm | 6.01 passcrust on alarm | 5.68 passbase on flare |
accents closest pair, ΔEOK | 0.06 | 0.070 passiris / steel | 0.070 passiris / steel | 0.070 passiris / steel | 0.060 passice / steel |
The gate also checks two things the table cannot show:
- Accent separation. No two accents inside one flavor may come within ΔEOK 0.06, so
voltnever reads asflareat a different size andicenever collapses intoarc. - Identity. Every flavor’s
basestays at least 0.03 ΔEOK from sixteen popular dark and light themes (Static Bloom, Catppuccin, Rose Pine, Tokyo Night, Dracula, Nord and friends), with 0.045 as an advisory margin. The gate prints APCA Lc values for text roles as information.
What follows from the table:
textis 7:1 (AAA) oncrust,mantle,baseandsurface0, and 4.5:1 on the raised fills;subtext1andsubtext0are body-safe on the page backgrounds.- Every accent is AA on
crust,mantle,baseandsurface0, so colored text, links and soft badges stay readable in any accent scope. - Soft badges and buttons sit on a 16% tint of their own color, so their text mixes the intent with
fgper flavor (--nw-soft-ink: 100% in Abyss, 90% in Nocturne, 75% in Twilight, 70% in Lumen). That keeps them AA on the same four grounds. on-accenttext is AA on every solid accent fill, which covers solid buttons and badges.overlay1(line-strong) meets the 3:1 non-text minimum for input borders and control edges;overlay0(line) is decorative only, and the circuit grid sits on it by design.
Every focusable element gets a visible ring on keyboard focus: the base layer styles :focus-visible with a 2px outline in --nw-ring (the primary intent, so it follows data-accent) at a 2px offset, and interactive components add their intent glow on top. Tab through these controls to see it:
Tokens: --nw-ring, --nw-ring-width (2px) and --nw-ring-offset (2px). Do not remove the outline; restyle it through the tokens instead.
Keyboard
Section titled “Keyboard”- CSS components build on native elements (
<button>,<a>,<details>,<dialog>,<meter>, the Popover API), so keyboard behavior comes from the browser. - Vue components wrap Reka UI primitives: arrow-key roving focus in toolbars and toggle groups, typeahead in lists, Escape to close the topmost overlay, focus trapped inside dialogs and returned to the trigger on close, and the ARIA roles and states each pattern needs.
- Icon-only buttons need an accessible name: give them
aria-label.
Motion
Section titled “Motion”Decorative animation stops under prefers-reduced-motion: reduce: durations collapse to 0.01ms, loops run once, and .nw-motion-essential opts meaning-bearing motion (a spinner for pending work) back in. See Effects & motion.
Forced colors
Section titled “Forced colors”Under forced-colors: active the motif utilities fall back to system colors: cut and wire surfaces become a plain Canvas box with a real border, the scanline overlay and circuit grid are removed, and buttons keep their state through Highlight/HighlightText rather than color. Disabled controls show as GrayText.
Color is never the only signal
Section titled “Color is never the only signal”Intent colors always travel with words or icons: alerts have titles, badges have text, meters show their value, and form errors are written out under the field with aria-invalid set. Keep that pairing when you compose your own components.
Targets
Section titled “Targets”Control heights are 1.75rem (xs), 2rem (sm), 2.5rem (md, the default) and 3rem (lg), above the 24px WCAG 2.2 minimum. Inputs are 2.5rem tall. On touch layouts, prefer md or larger.