Skip to content

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.

Generated from semanticRoles. The swatches are the token resolved in each flavor.

Semantic color roles with their CSS variable, Tailwind key, palette color and the hex value in every flavor
CSS variableTailwind keyPaletteAbyssNocturneTwilightLumen
--nw-canvascanvasbase#080720#14093e#271a4b#eae6ff
--nw-canvas-subtlecanvas-subtlemantle#050419#0e0533#211540#dedaff
--nw-canvas-sunkencanvas-sunkencrust#030312#0a0329#1b1136#d3cefa
--nw-panelpanelsurface0#12122f#1d154c#312457#ddd9ff
--nw-panel-hoverpanel-hoversurface1#1b1c3b#272258#3b2f61#d1cdf8
--nw-panel-activepanel-activesurface2#262747#302d60#453b6a#c6c1ef
--nw-fgfgtext#f0f1f7#f2f3fa#f5f4fa#1f0e47
--nw-fg-mutedfg-mutedsubtext1#d0d2dd#d4d4e3#d9d7e4#3d326b
--nw-fg-subtlefg-subtlesubtext0#aeb0c1#b2b4ca#bab7cd#524a7e
--nw-fg-faintfg-faintoverlay2#82849b#8b8cab#9793af#686191
--nw-fg-disabledfg-disabledoverlay1#646781#6c6d93#7c7799#7c76a4
--nw-linelineoverlay0#3e415f#464673#59517a#b0abd9
--nw-line-strongline-strongoverlay1#646781#6c6d93#7c7799#7c76a4
--nw-line-brightline-brightoverlay2#82849b#8b8cab#9793af#686191
--nw-primaryprimaryindigo#848fff#848fff#848fff#4940d7
--nw-secondarysecondarysynth#ff47d8#ff47d8#ff47d8#a8008b
--nw-tertiarytertiaryice#5eddfe#5eddfe#5eddfe#006081
--nw-infoinfoarc#4aa9ff#4aa9ff#4aa9ff#0055b6
--nw-successsuccessmatrix#4bf677#4bf677#4bf677#00680f
--nw-warningwarningvolt#f8e445#f8e445#f8e445#6e5700
--nw-dangerdangeralarm#ff5d7b#ff5d7b#ff5d7b#b6002c
--nw-ringringindigo#848fff#848fff#848fff#4940d7
--nw-linklinkiris#cdc0ff#cdc0ff#cdc0ff#6746a7
  • Surfaces: canvas is the page; canvas-subtle holds sidebars, navigation and inputs; canvas-sunken holds app chrome, HUD backdrops and code. panel raises cards, menus and popovers, with panel-hover and panel-active for interaction.
  • Text: fg for body text, fg-muted for secondary text, fg-subtle for placeholders, fg-faint for icons and comments, fg-disabled for disabled controls.
  • Lines: line for decorative hairlines and the circuit grid, line-strong for component boundaries such as input borders (3:1 or better), line-bright for emphasis.
  • Intents: primary (or the data-accent choice), secondary, tertiary, info, success, warning, danger. ring follows primary; link stays iris so links keep their color under any accent.

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

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:

The twelve accents with their meaning, tokens and a badge in a dark and a light flavor
AccentMeaningTokensNocturneLumen
indigoBrand primary: buttons, focus rings, glowprimaryring--nw-indigonw-indigoindigoindigo
irisPale violet: links, parameterslink--nw-irisnw-irisirisiris
fluxElectric violet: keywords--nw-fluxnw-fluxfluxflux
synthSecondary; the far end of the wire gradient, tagssecondary--nw-synthnw-synthsynthsynth
alarmDanger, errors, deletions, booleansdanger--nw-alarmnw-alarmalarmalarm
flareOrange: numbers and constants--nw-flarenw-flareflareflare
voltWarning; types and classeswarning--nw-voltnw-voltvoltvolt
matrixSuccess; strings, insertionssuccess--nw-matrixnw-matrixmatrixmatrix
circuitTeal: attributes, operators, regex--nw-circuitnw-circuitcircuitcircuit
iceTertiary; propertiestertiary--nw-icenw-iceiceice
arcInfo; functions and methodsinfo--nw-arcnw-arcarcarc
steelNeutral metal: quiet badges and chrome--nw-steelnw-steelsteelsteel

Generated from syntaxRoles and used by the Expressive Code themes of the Starlight plugin. Code backgrounds are crust; dark flavors share the token colors.

Syntax highlighting roles with their palette color and samples in Nocturne and Lumen
RolePaletteNocturneLumen
keywordfluxkeywordkeyword
storagesynthstoragestorage
modifiersynthmodifiermodifier
stringmatrixstringstring
numberflarenumbernumber
constantflareconstantconstant
booleanalarmbooleanboolean
nullalarmnullnull
functionarcfunctionfunction
methodarcmethodmethod
typevolttypetype
classvoltclassclass
interfacevoltinterfaceinterface
enumvoltenumenum
namespacevoltnamespacenamespace
variabletextvariablevariable
parameteririsparameterparameter
propertyicepropertyproperty
tagsynthtagtag
attributecircuitattributeattribute
operatorcircuitoperatoroperator
punctuationoverlay2punctuationpunctuation
commentoverlay2italiccommentcomment
regexcircuitregexregex
escapesynthescapeescape
decoratorsynthdecoratordecorator
markup-headingindigomarkup-headingmarkup-heading
markup-linkirismarkup-linkmarkup-link
insertedmatrixinsertedinserted
deletedalarmdeleteddeleted
changedvoltchangedchanged
editor-bgcrustcrust fillcrust fill
selectionindigo30%indigo fillindigo fill
line-highlightsurface0surface0 fillsurface0 fill