Color roles
Components never reference a raw palette color. They use semantic roles, which resolve to a palette color in the nearest flavor scope. The same names work as CSS variables (--nw-canvas) and as Tailwind color keys (bg-canvas, text-fg-muted, border-line-strong). Raw palette keys carry an nw- prefix in Tailwind (bg-nw-indigo) so the neutral named base cannot collide with text-base.
Semantic tokens
Section titled “Semantic tokens”Generated from semanticRoles. The swatches are the token resolved in each flavor.
| CSS variable | Tailwind key | Palette | Abyss | Nocturne | Twilight | Lumen |
|---|---|---|---|---|---|---|
--nw-canvas | canvas | base | #080720 | #14093e | #271a4b | #eae6ff |
--nw-canvas-subtle | canvas-subtle | mantle | #050419 | #0e0533 | #211540 | #dedaff |
--nw-canvas-sunken | canvas-sunken | crust | #030312 | #0a0329 | #1b1136 | #d3cefa |
--nw-panel | panel | surface0 | #12122f | #1d154c | #312457 | #ddd9ff |
--nw-panel-hover | panel-hover | surface1 | #1b1c3b | #272258 | #3b2f61 | #d1cdf8 |
--nw-panel-active | panel-active | surface2 | #262747 | #302d60 | #453b6a | #c6c1ef |
--nw-fg | fg | text | #f0f1f7 | #f2f3fa | #f5f4fa | #1f0e47 |
--nw-fg-muted | fg-muted | subtext1 | #d0d2dd | #d4d4e3 | #d9d7e4 | #3d326b |
--nw-fg-subtle | fg-subtle | subtext0 | #aeb0c1 | #b2b4ca | #bab7cd | #524a7e |
--nw-fg-faint | fg-faint | overlay2 | #82849b | #8b8cab | #9793af | #686191 |
--nw-fg-disabled | fg-disabled | overlay1 | #646781 | #6c6d93 | #7c7799 | #7c76a4 |
--nw-line | line | overlay0 | #3e415f | #464673 | #59517a | #b0abd9 |
--nw-line-strong | line-strong | overlay1 | #646781 | #6c6d93 | #7c7799 | #7c76a4 |
--nw-line-bright | line-bright | overlay2 | #82849b | #8b8cab | #9793af | #686191 |
--nw-primary | primary | indigo | #848fff | #848fff | #848fff | #4940d7 |
--nw-secondary | secondary | synth | #ff47d8 | #ff47d8 | #ff47d8 | #a8008b |
--nw-tertiary | tertiary | ice | #5eddfe | #5eddfe | #5eddfe | #006081 |
--nw-info | info | arc | #4aa9ff | #4aa9ff | #4aa9ff | #0055b6 |
--nw-success | success | matrix | #4bf677 | #4bf677 | #4bf677 | #00680f |
--nw-warning | warning | volt | #f8e445 | #f8e445 | #f8e445 | #6e5700 |
--nw-danger | danger | alarm | #ff5d7b | #ff5d7b | #ff5d7b | #b6002c |
--nw-ring | ring | indigo | #848fff | #848fff | #848fff | #4940d7 |
--nw-link | link | iris | #cdc0ff | #cdc0ff | #cdc0ff | #6746a7 |
- Surfaces:
canvasis the page;canvas-subtleholds sidebars, navigation and inputs;canvas-sunkenholds app chrome, HUD backdrops and code.panelraises cards, menus and popovers, withpanel-hoverandpanel-activefor interaction. - Text:
fgfor body text,fg-mutedfor secondary text,fg-subtlefor placeholders,fg-faintfor icons and comments,fg-disabledfor disabled controls. - Lines:
linefor decorative hairlines and the circuit grid,line-strongfor component boundaries such as input borders (3:1 or better),line-brightfor emphasis. - Intents:
primary(or thedata-accentchoice),secondary,tertiary,info,success,warning,danger.ringfollowsprimary;linkstaysirisso links keep their color under any accent.
Derived tokens
Section titled “Derived tokens”These are built with color-mix() in @nyxwire/css and have no palette entry of their own.
| CSS variable | Value | Tailwind key |
|---|---|---|
--nw-on-<intent> |
--nw-on-accent: text on a solid intent fill (crust on dark flavors, base on Lumen) |
on-primary, on-secondary, on-tertiary, on-info, on-success, on-warning, on-danger |
--nw-<intent>-soft |
intent at 16% over transparent | primary-soft, secondary-soft, tertiary-soft, info-soft, success-soft, warning-soft, danger-soft |
--nw-soft-ink |
share of the intent in text on its own soft tint, the rest is fg: 100% in Abyss, 90% in Nocturne, 75% in Twilight, 70% in Lumen |
none (CSS only) |
--nw-selection |
primary at 32% |
selection |
--nw-backdrop |
shadow-ink at up to 72%, behind dialogs |
backdrop |
--nw-glass |
canvas at 78%, for panels over imagery |
glass |
--nw-shadow-ink |
crust on dark flavors, text on Lumen; the ink of shadows and scrims |
shadow-ink |
Accents
Section titled “Accents”Every accent passes 4.5:1 on crust, mantle, base and surface0 in its flavor, so any of them can be used for text. Meanings stay stable across flavors:
| Accent | Meaning | Tokens | Nocturne | Lumen |
|---|---|---|---|---|
| indigo | Brand primary: buttons, focus rings, glowprimaryring | --nw-indigonw-indigo | indigo | indigo |
| iris | Pale violet: links, parameterslink | --nw-irisnw-iris | iris | iris |
| flux | Electric violet: keywords | --nw-fluxnw-flux | flux | flux |
| synth | Secondary; the far end of the wire gradient, tagssecondary | --nw-synthnw-synth | synth | synth |
| alarm | Danger, errors, deletions, booleansdanger | --nw-alarmnw-alarm | alarm | alarm |
| flare | Orange: numbers and constants | --nw-flarenw-flare | flare | flare |
| volt | Warning; types and classeswarning | --nw-voltnw-volt | volt | volt |
| matrix | Success; strings, insertionssuccess | --nw-matrixnw-matrix | matrix | matrix |
| circuit | Teal: attributes, operators, regex | --nw-circuitnw-circuit | circuit | circuit |
| ice | Tertiary; propertiestertiary | --nw-icenw-ice | ice | ice |
| arc | Info; functions and methodsinfo | --nw-arcnw-arc | arc | arc |
| steel | Neutral metal: quiet badges and chrome | --nw-steelnw-steel | steel | steel |
Syntax roles
Section titled “Syntax roles”Generated from syntaxRoles and used by the Expressive Code themes of the Starlight plugin. Code backgrounds are crust; dark flavors share the token colors.
| Role | Palette | Nocturne | Lumen |
|---|---|---|---|
| keyword | flux | keyword | keyword |
| storage | synth | storage | storage |
| modifier | synth | modifier | modifier |
| string | matrix | string | string |
| number | flare | number | number |
| constant | flare | constant | constant |
| boolean | alarm | boolean | boolean |
| null | alarm | null | null |
| function | arc | function | function |
| method | arc | method | method |
| type | volt | type | type |
| class | volt | class | class |
| interface | volt | interface | interface |
| enum | volt | enum | enum |
| namespace | volt | namespace | namespace |
| variable | text | variable | variable |
| parameter | iris | parameter | parameter |
| property | ice | property | property |
| tag | synth | tag | tag |
| attribute | circuit | attribute | attribute |
| operator | circuit | operator | operator |
| punctuation | overlay2 | punctuation | punctuation |
| comment | overlay2italic | comment | comment |
| regex | circuit | regex | regex |
| escape | synth | escape | escape |
| decorator | synth | decorator | decorator |
| markup-heading | indigo | markup-heading | markup-heading |
| markup-link | iris | markup-link | markup-link |
| inserted | matrix | inserted | inserted |
| deleted | alarm | deleted | deleted |
| changed | volt | changed | changed |
| editor-bg | crust | crust fill | crust fill |
| selection | indigo30% | indigo fill | indigo fill |
| line-highlight | surface0 | surface0 fill | surface0 fill |