Colors

Color Step Ranges (12-Step Framework)

Steps 12
Backgrounds

App background and subtle component fills.

Steps 35
Interactive components

Normal / hover / active backgrounds for interactive elements.

Steps 68
Borders and separators

Subtle to pronounced borders, from a hairline to a focus outline.

Steps 910
Solid colors

The color's "brand" moment — solid buttons, badges, indicators.

Steps 1112
Accessible text

Low- and high-contrast text on the app background.

Gray families — real values (this package's actual --n-* scale per family)

These don't change with the Appearance toggle, on purpose: this package's foundation scale is theme-independent (see design-system/AGENTS.md) — light/dark differs in which semantic ROLE picks which step (e.g. bg-canvas = step 50 in light, step 1000/black in dark), not in the swatch values themselves.

Backgrounds
Interactive components
Borders and separators
Solid colors
Accessible text
1
2
3
4
5
6
7
8
9
10
11
12
Zinc
Slate
Gray
Neutral
Stone

Accent colors — generated illustration, light mode

Unlike the grays above, this package only stores ONE hex per accent (see the Configurator's swatch grid) — not a real 12-step scale per theme the way Radix's own colors ship. These rows are generated from that single hue via HSL lightness interpolation (a different curve per theme, which IS how Radix's real scales work) to show what applying the same framework would look like; they're illustrative, not perceptually tuned. Toggle Appearance in the Configurator to see it flip.

Backgrounds
Interactive components
Borders and separators
Solid colors
Accessible text
1
2
3
4
5
6
7
8
9
10
11
12
Monochrome
Tomato
Red
Ruby
Crimson
Pink
Plum
Purple
Violet
Iris
Indigo
Blue
Cyan
Teal
Jade
Green
Grass
Lime
Mint
Sky
Amber
Gold
Bronze
Brown

Semantic tokens — what components actually consume

Backgrounds
Canvas
--bg-canvas
Surface
--bg-surface
Surface hover
--bg-surface-hover
Elevated
--bg-elevated
Borders
Hairline
--hairline
Hairline strong
--hairline-strong
Text
Foreground
--fg
Foreground muted
--fg-muted
Foreground subtle
--fg-subtle
Link
--link
Accent
Accent
--accent
Accent hover
--accent-hover
Accent foreground
--accent-fg
Accent contrast
--accent-contrast
Accent text (alias)
--accent-text
Accent subtle bg
--accent-subtle
Accent subtle hover
--accent-subtle-hover
Status
Success
--success
Warning
--warning
Danger
--danger

Shadows, highlights, and overlays

Black overlay scale (0%–100% opacity)
White overlay scale (0%–100% opacity)

Smart Accent Semantics & Dynamic Luminance Engine

In traditional component libraries, switching an accent color to a high-luminance hue (like Lime, Mint, Amber, or Sky) severely breaks text readability on light surfaces, while selecting dark monochrome colors causes text to vanish in dark mode. @shavin/ui solves this with an integrated, mathematical Dynamic Luminance Engine that guarantees WCAG 2.1 AAA contrast compliance across all 24 presets in both themes.

1. Mathematical Luminance

Evaluates exact linear RGB coefficients per WCAG spec:
L = 0.2126R + 0.7152G + 0.0722B

2. Adaptive Contrast Text

Accents with L > 0.35 in light mode are dynamically darkened for --accent-contrast text, while dark accents in dark mode are complemented to ensure crisp ≥ 4.5:1 text contrast.

3. Achromatic Inversion

Monochrome black (0 0 0) seamlessly inverts to pure white (255 255 255) in dark mode, maintaining pristine brand contrast without manual theme configuration.

Complete Accent Semantic Hierarchy
--accentSolid brand fill for primary buttons, active toggles, and key accents.
--accent-fgContrast-safe foreground (black or white) rendered on top of solid accent fills.
--accent-contrastLuminance-corrected accent tone for text, icons, and glyphs on canvas/surface.
--accent-subtle12% translucent background tint for soft-variant buttons and tags.
Live Component Preview
Updates live with active accent
Accent Badge--accent-contrast sample
Configure Theme
Theme
Accent Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font