Skip to main contentSkip to docs navigation

Color System

Three-layer color architecture covering primitive scales, semantic context palettes, and body variables — consistent theming across light and dark modes.

Chassis CSS organizes color into three layers that build on each other. Primitive colors give every brand hue a numbered scale. Context colors map those scales onto semantic roles such as fg-main or bg-evident. Body colors alias the active context's tokens to the CSS variables components consume directly. To switch a theme or change the active context, only the active palette changes — every component picks up the new colors automatically.

Primitive colors

Primitive colors and their scale steps are defined in Chassis Tokens. By default there are seven hues — one per brand role — and any project can swap them for its own palette.

primary#00A4CC
primary-05
primary-10
primary-20
primary-30
primary-40
primary-50
primary-60
primary-70
primary-80
primary-90
primary-95
secondary#F55200
secondary-05
secondary-10
secondary-20
secondary-30
secondary-40
secondary-50
secondary-60
secondary-70
secondary-80
secondary-90
secondary-95
neutral#6F8085
neutral-05
neutral-10
neutral-20
neutral-30
neutral-40
neutral-50
neutral-60
neutral-70
neutral-80
neutral-90
neutral-95
danger#F52314
danger-05
danger-10
danger-20
danger-30
danger-40
danger-50
danger-60
danger-70
danger-80
danger-90
danger-95
success#10C263
success-05
success-10
success-20
success-30
success-40
success-50
success-60
success-70
success-80
success-90
success-95
warning#F5A300
warning-05
warning-10
warning-20
warning-30
warning-40
warning-50
warning-60
warning-70
warning-80
warning-90
warning-95
info#1414F5
info-05
info-10
info-20
info-30
info-40
info-50
info-60
info-70
info-80
info-90
info-95

Each hue has eleven scale steps: 05, 1090 in increments of ten, and 95, with 50 as the mid-point. Components and utilities never reference these scales directly — they consume them through the context layer. The scales are still exposed as CSS variables (e.g. --cx-primary-50) for custom code that references a primitive value directly.

Context colors

A context color is a palette of semantic tokens that adapts to light and dark mode. Chassis CSS ships with eleven: the seven brand hues — primary, secondary, neutral, success, warning, danger, info — plus four non-brand contexts: default, alternate, black, and white.

--cx-default
--cx-alternate
--cx-primary
--cx-secondary
--cx-neutral
--cx-danger
--cx-success
--cx-warning
--cx-info
--cx-black
--cx-white

Each non-brand context plays a specific role:

  • default — the standard page background and text. In dark mode it inverts automatically: light-on-dark instead of dark-on-light.
  • alternate — for prominent regions such as sidebars, banners, and callout sections. Whether it inverts in dark mode is controlled by the Chassis Tokens configuration.
  • black and white — fixed values that do not adapt to light or dark mode.

Context palettes

Each context color comes with a full palette of 39 semantic tokens grouped into nine categories: Base, Foreground, Background, Border, Icon, Cue, Dim, Link, and Interaction. Each token maps to a CSS variable named --cx-{context}-{token}, for example --cx-primary-fg-main.

Description

Base Colors

The base color for the context, its contrast counterpart, and a fully transparent variant. Contrast colors are intended for design use and may not meet accessibility contrast requirements.

Foreground Colors

Text colors named by priority or function. Used for the color property. Following abstraction principles, these tokens are not limited to text — they apply to any foreground element.

Background Colors

Solid surface colors named by priority and function. Used for the background-color property.

Border Colors

Colors for borders and separator lines. Used for the border-color property.

Icon Colors

Colors for symbolic elements such as icons, list bullets, and disclosure arrows. Used for the color and fill properties.

Cue Colors

Colors for activity indicators and selection marks. Used for the fill and accent-color properties.

Dim Colors

Semi-transparent surface colors named by function. Used for the background-color property. Suitable for overlays and layered UI surfaces.

Link Colors

Colors for anchor elements across all states. Used for the color property.

Interaction Colors

State colors for interactive elements such as buttons. Available as CSS variables only — not exposed as utility classes.

default
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
alternate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
primary
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
secondary
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
neutral
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
danger
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
success
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
warning
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
info
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
black
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
white
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Variable Name
--cx-*-base-color
--cx-*-contrast-color
--cx-*-transparent-color
--cx-*-fg-main
--cx-*-fg-subtle
--cx-*-fg-slight
--cx-*-fg-active
--cx-*-fg-inverse
--cx-*-fg-solid
--cx-*-fg-highlight
--cx-*-bg-main
--cx-*-bg-even
--cx-*-bg-evident
--cx-*-bg-active
--cx-*-bg-inverse
--cx-*-bg-solid
--cx-*-bg-highlight
--cx-*-border-main
--cx-*-border-subtle
--cx-*-icon-main
--cx-*-icon-subtle
--cx-*-icon-slight
--cx-*-cue-main
--cx-*-cue-slight
--cx-*-dim-slight
--cx-*-dim-main
--cx-*-dim-subtle
--cx-*-link-main
--cx-*-link-hover
--cx-*-link-active
--cx-*-link-visited
--cx-*-fg-idle
--cx-*-bg-idle
--cx-*-fg-hover
--cx-*-bg-hover
--cx-*-fg-press
--cx-*-bg-press
--cx-*-fg-disabled
--cx-*-bg-disabled

--cx-*-contrast-color tokens are intended for design use and may not meet WCAG contrast requirements. Do not use them for accessible text.

Palette values are resolved at build time by Chassis Tokens through Tokens Studio's color processor. Each token combines a primitive color reference with an opacity value — both defined as tokens themselves — and the output arrives in CSS as a pre-computed custom property. The default context in light mode illustrates the pattern:

SCSS
// Illustrative — derivation happens in Chassis Tokens at build time.
// Light theme.
$default-fg-main:      $black;
$default-fg-subtle:    to-opacity($default-fg-main, $opacity-fg-subtle);
$default-fg-slight:    to-opacity($default-fg-main, $opacity-fg-slight);
$default-bg-main:      $white;
$default-bg-even:      $neutral-05;
$default-bg-evident:   $neutral-10;

Body colors

The body context — default out of the box — is set in Chassis Tokens. Its tokens become the page-level palette: the context prefix is dropped, so --cx-default-fg-main becomes --cx-fg-main, --cx-default-bg-main becomes --cx-bg-main, and so on.

Eleven of those tokens then receive a further alias — a body semantic variable renamed for the CSS property each one drives. --cx-fg-main becomes --cx-fg-color, and --cx-border-main and --cx-border-subtle become --cx-border-color and --cx-separator-color. Interaction tokens have no body alias; components consume them directly by name.

Variable Name
--cx-fg-color
--cx-bg-color
--cx-border-color
--cx-separator-color
--cx-icon-color
--cx-bullet-color
--cx-cue-color
--cx-link-color
--cx-hover-color
--cx-active-color
--cx-visited-color
Color
 
 
 
 
 
 
 
 
 
 
 
Related Property
color
background-color
border-color
border-color
color, fill
color, fill
accent, fill
color
color (:hover)
color (:active)
color (:visited)
Default Value
--cx-fg-main
--cx-bg-main
--cx-border-main
--cx-border-subtle
--cx-icon-main
--cx-icon-subtle
--cx-cue-main
--cx-link-main
--cx-link-hover
--cx-link-active
--cx-link-visited

The .context class re-aims those body variables in markup. Applying .context.primary to any element switches its body variables to the primary palette — for that element and everything inside it.

Further reading

Token values and context mappings are configured in Chassis Tokens; CSS variable names mirror Figma variable paths — color/context/{context}/{token} in Figma becomes --cx-{context}-{token} in CSS.

  • Colors — utility classes for applying foreground color.
  • Background — utility classes for applying background color.
  • Context Class — how to scope a palette to a region of the page.
  • Color modes — how to toggle between light and dark themes.