Skip to main content

Colors

trust-ui v2 uses the Indigo Premium palette — a gradient indigo primary on warm ivory neutrals (light) or deep charcoal (dark). All values are CSS Custom Properties consumed by every component.

Light theme

Surface

TokenValueUsage
--tui-bg#fbfaf7Page background (warm ivory)
--tui-bg-subtle#ffffffLifted surface (cards)
--tui-bg-muted#f4f1eaMuted areas (sidebars, hover bg base)
--tui-bg-hover#ede9dfHover background
--tui-bg-active#e3dcccPressed/active background

Text

TokenValueUsage
--tui-text#14151aPrimary text
--tui-text-secondary#4b4d59Secondary / labels
--tui-text-muted#8a8b96De-emphasized text
--tui-text-inverse#fbfaf7Text on dark surfaces

Border

TokenValueUsage
--tui-border#ede9dfDefault border
--tui-border-hover#d8d2c4Border hover
--tui-border-strong#b8b0a0Strong border (separators)
--tui-border-focus#635bffFocus outline color

Primary — Indigo

TokenValueUsage
--tui-primary#635bffIndigo primary
--tui-primary-hover#5048e8Hover state
--tui-primary-active#4036c4Active state
--tui-primary-subtle#f1eef8Subtle bg for badges/active pages
--tui-primary-subtle-hover#e6e1f4Subtle-bg hover
--tui-primary-text#ffffffText on primary bg
--tui-primary-gradientlinear-gradient(180deg, #635bff 0%, #4f47e0 100%)Gradient on Primary/Danger buttons

Secondary (charcoal)

TokenValueUsage
--tui-secondary#2a2b34Charcoal secondary
--tui-secondary-hover#1e1f27Hover
--tui-secondary-active#14151aActive
--tui-secondary-subtle#f4f1eaSubtle bg
--tui-secondary-text#fbfaf7Text on secondary bg

Status

TokenValueSubtleText
--tui-success#15803d#ecfdf3#ffffff
--tui-danger#dc2626#fef2f2#ffffff
--tui-warning#b45309#fef3c7#ffffff
--tui-info#635bff#f1eef8#ffffff

info shares the indigo primary by design — informational accents match the brand color.

Focus & Overlay

TokenValueUsage
--tui-focus-ring0 0 0 2px var(--tui-bg), 0 0 0 4px rgba(99, 91, 255, 0.5)2-layer focus glow
--tui-overlayrgba(15, 16, 26, 0.32)Backdrop for Dialog/BottomSheet

Glass (Tier 3 elevated surfaces)

TokenValueUsage
--tui-glass-bgrgba(255, 255, 255, 0.72)Translucent surface bg
--tui-glass-borderrgba(255, 255, 255, 0.5)Glass edge
--tui-glass-shadow0 8px 32px rgba(15,16,26,.12), inset 0 1px 0 rgba(255,255,255,.6)Glass elevation shadow

See Elevation for usage of glass tokens.


Dark theme

The dark palette uses lifted indigo (#7c75ff — slightly brighter than the light primary so it reads on dark surfaces) with deep charcoal backgrounds.

Surface

TokenValueUsage
--tui-bg#0e0f14Page background
--tui-bg-subtle#181922Lifted surface
--tui-bg-muted#14151cMuted areas
--tui-bg-hover#23242eHover
--tui-bg-active#2d2e38Pressed

Text

TokenValueUsage
--tui-text#ededf0Primary
--tui-text-secondary#a5a6aeSecondary
--tui-text-muted#6e6f78Muted
--tui-text-inverse#14151aText on light surfaces

Border

TokenValueUsage
--tui-border#23242eDefault
--tui-border-hover#33343eHover
--tui-border-strong#4a4b56Strong
--tui-border-focus#7c75ffFocus

Primary — lifted Indigo

TokenValue
--tui-primary#7c75ff
--tui-primary-hover#948dff
--tui-primary-active#6c64f0
--tui-primary-subtlergba(124, 117, 255, 0.14)
--tui-primary-subtle-hoverrgba(124, 117, 255, 0.22)
--tui-primary-text#ffffff
--tui-primary-gradientlinear-gradient(180deg, #7c75ff 0%, #5f56f5 100%)

Status (dark-tuned)

TokenValueSubtle
--tui-success#22c55ergba(34, 197, 94, 0.14)
--tui-danger#ef4444rgba(239, 68, 68, 0.14)
--tui-warning#fbbf24rgba(251, 191, 36, 0.14)

Glass

TokenValue
--tui-glass-bgrgba(24, 25, 34, 0.72)
--tui-glass-borderrgba(255, 255, 255, 0.1)
--tui-glass-shadow0 8px 32px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08)

Customizing the palette

To override any token, write a more-specific selector after trust-ui's stylesheet is loaded:

/* Override the primary indigo with your brand color */
[data-theme='light'] {
--tui-primary: #ff6b35;
--tui-primary-hover: #e85a28;
--tui-primary-active: #c94a20;
--tui-primary-gradient: linear-gradient(180deg, #ff6b35 0%, #e85a28 100%);
}

All components consume these tokens via var(), so a single override propagates everywhere. See Theming for the full custom-palette recipe.