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 (--sb-canvas) and as Tailwind color keys (bg-canvas, text-fg-muted, border-line-strong).

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 keyPaletteDuskMidnightBlackoutDaybreak
--sb-canvascanvasbase#2f2235#111629#060910#f9f5fa
--sb-canvas-subtlecanvas-subtlemantle#271b2c#0b0f20#03050a#f1eaf2
--sb-canvas-sunkencanvas-sunkencrust#1f1424#060918#010205#e7e0e9
--sb-panelpanelsurface0#392c3e#1b2034#0e131b#ebe3ec
--sb-panel-hoverpanel-hoversurface1#433748#262c3f#181d26#e0d7e1
--sb-panel-activepanel-activesurface2#4d4152#323749#232831#d5ccd7
--sb-fgfgtext#f1edf3#ebedf2#eef0f4#2a1d2d
--sb-fg-mutedfg-mutedsubtext1#d3cdd6#c6c9d1#c3c6cb#4d4050
--sb-fg-subtlefg-subtlesubtext0#b8afbc#a2a6b1#9da0a6#635665
--sb-fg-faintfg-faintoverlay2#968d9b#7d818e#767a82#776b7a
--sb-fg-disabledfg-disabledoverlay1#7c7182#626776#5b5f67#8d828f
--sb-linelineoverlay0#615667#474c5d#393d46#c4bac6
--sb-line-strongline-strongoverlay1#7c7182#626776#5b5f67#8d828f
--sb-line-brightline-brightoverlay2#968d9b#7d818e#767a82#776b7a
--sb-primaryprimaryplasma#fd65b2#fd65b2#fd65b2#c20072
--sb-secondarysecondaryultraviolet#b580ff#b580ff#b580ff#7c3ad3
--sb-infoinfoion#59a7ff#59a7ff#59a7ff#0160d1
--sb-successsuccessacid#a1ee54#a1ee54#a1ee54#2d7304
--sb-warningwarningsodium#ffa73e#ffa73e#ffa73e#9c5100
--sb-dangerdangerlaser#ff7379#ff7379#ff7379#c51d28
--sb-ringringplasma#fd65b2#fd65b2#fd65b2#c20072
--sb-linklinkplasma#fd65b2#fd65b2#fd65b2#c20072
  • 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, 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, info, success, warning, danger. ring and link follow primary.

These are built with color-mix() in @static-bloom/css and have no palette entry of their own.

CSS variable Value Tailwind key
--sb-on-<intent> --sb-on-accent: text on a solid intent fill (crust on dark flavors, base on Daybreak) on-primary, on-secondary, on-info, on-success, on-warning, on-danger
--sb-<intent>-soft intent at 16% over transparent none (CSS only)
--sb-soft-ink share of the intent in soft-variant and button-hover text, the rest is fg: 100% in Blackout, 90% in Midnight, 75% in Dusk and Daybreak none (CSS only)
--sb-selection ultraviolet at 35% none (CSS only)
--sb-backdrop crust at 72%, behind dialogs backdrop
--sb-glass base at 88%, for panels over imagery glass

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
AccentMeaningTokensDarkDaybreak
plasmaBrand primary: links, focusprimaryringlink--sb-plasmasb-plasmaplasmaplasma
laserDanger, errors, deletionsdanger--sb-lasersb-laserlaserlaser
emberRose-coral: parameters, booleans--sb-embersb-emberemberember
sodiumWarning; numbers and constantswarning--sb-sodiumsb-sodiumsodiumsodium
halogenLamp yellow: types, highlights--sb-halogensb-halogenhalogenhalogen
acidSuccess; stringssuccess--sb-acidsb-acidacidacid
coolantAquamarine: operators, regex--sb-coolantsb-coolantcoolantcoolant
frostIce blue: properties--sb-frostsb-frostfrostfrost
ionInfo; functionsinfo--sb-ionsb-ionionion
ultravioletSecondary; keywordssecondary--sb-ultravioletsb-ultravioletultravioletultraviolet
orchidLilac-pink: storage, decorators--sb-orchidsb-orchidorchidorchid
chromeSilver: neutral and metal badges--sb-chromesb-chromechromechrome

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 Midnight and Daybreak
RolePaletteMidnightDaybreak
keywordultravioletkeywordkeyword
storageorchidstoragestorage
modifierorchidmodifiermodifier
stringacidstringstring
numbersodiumnumbernumber
constantsodiumconstantconstant
booleanemberbooleanboolean
nullembernullnull
functionionfunctionfunction
methodionmethodmethod
typehalogentypetype
classhalogenclassclass
interfacehalogeninterfaceinterface
enumhalogenenumenum
namespacehalogennamespacenamespace
variabletextvariablevariable
parameteremberparameterparameter
propertyfrostpropertyproperty
tagplasmatagtag
attributecoolantattributeattribute
operatorcoolantoperatoroperator
punctuationoverlay2punctuationpunctuation
commentoverlay2italiccommentcomment
regexcoolantregexregex
escapeplasmaescapeescape
decoratororchiddecoratordecorator
markup-headingplasmamarkup-headingmarkup-heading
markup-linkionmarkup-linkmarkup-link
insertedacidinsertedinserted
deletedlaserdeleteddeleted
changedsodiumchangedchanged
editor-bgcrustcrust fillcrust fill
selectionultraviolet30%ultraviolet fillultraviolet fill
line-highlightsurface0surface0 fillsurface0 fill