Colors & Design Tokens
StableA structured, semantic color system for the SiberUI design language. Organised into 50-950 color scale objects, Surfaces, Signal colors, Text, Borders, Status, Glassmorphism, Glow tokens, and Motion presets.
Installation
Import & Usage
SiberUI exports individual color scales directly (e.g., red[500], cyan[500], blue[600]) alongside semantic tokens:
import { red, blue, cyan, slate, colors, surface, signal } from '@siberui/react';
// 1. Direct Shade Scale Usage
const dangerButtonBg = red[500]; // '#ef4444'
const primaryAccent = cyan[500]; // '#00d9e8'
const secondaryBlue = blue[600]; // '#2563eb'
const surfaceDark = slate[950]; // '#05070a'
// 2. Semantic Token Usage
<div style={{ background: surface.level1, color: signal.cyan }}>
Cyber Core
</div>Color Palette Browser
Select a color family and copy any shade scale (50 - 950). Includes real-time WCAG 2.2 contrast ratio calculations against low-light background (#05070a).
Signal Colors
Signal colors carry semantic meaning across SiberUI interfaces. They guide the user's focus during high-density operations and critical events.
Cyan Primary
#00d9e8Primary interaction, key highlights, selections.
signal.cyan · cyan[500] · var(--sb-signal-cyan)Violet System
#a78bfaSpecial operations, AI prompts, telemetry mode.
signal.violet · violet[400] · var(--sb-signal-purple)Green Success
#34d399Operational success, online status, safe states.
signal.green · green[400] · var(--sb-signal-green)Amber Warning
#f5a524Warning alerts, pending actions, elevated risk.
signal.amber · amber[500] · var(--sb-signal-amber)Rose Critical
#fb5a7eCritical threats, destructive actions, errors.
signal.rose · rose[500] · var(--sb-signal-rose)Surface Elevation System
SiberUI uses a multi-tiered surface hierarchy (near-black rather than pure black) to establish depth and spatial awareness in low-light cyber displays.
Background
Surface
Elevated
Overlay
Modal
Text & Foreground Tokens
Standardized text opacity scale to ensure strict contrast compliance on dark surfaces.
Primary Text (Headings & Key Metrics) — #eceef2
Secondary Text (Body copy & descriptions) — rgba(236, 238, 242, 0.64)
Muted Text (Labels & metadata) — rgba(236, 238, 242, 0.38)
Disabled Text (Inactive items) — rgba(236, 238, 242, 0.24)
<div className="flex flex-col gap-3 p-4 bg-[#080b10] rounded-xl border border-white/10">
<p style={{ color: text.primary }} className="text-lg font-bold">
Primary Text (Headings & Key Metrics) — {text.primary}
</p>
<p style={{ color: text.secondary }} className="text-base">
Secondary Text (Body copy & descriptions) — {text.secondary}
</p>
<p style={{ color: text.muted }} className="text-sm">
Muted Text (Labels & metadata) — {text.muted}
</p>
<p style={{ color: text.disabled }} className="text-xs">
Disabled Text (Inactive items) — {text.disabled}
</p>
</div>Status & Semantic Roles
Pre-paired solid colors and muted backgrounds for status badges, alert banners, and telemetry feeds.
Glassmorphism & Glow Tokens
Controlled glow shadows and backdrop blur opacity presets designed for high-impact cards and command modals.
Cyberpunk Glow Shadows
Glassmorphism Overlay Presets
Motion & Easing Presets
Standardized duration and bezier curve presets for ultra-responsive UI micro-animations.
Durations (motion.duration)
- instant: 100ms (hover states, quick feedback)
- fast: 150ms (dropdowns, tooltips)
- normal: 220ms (modals, sheet drawers)
- slow: 400ms (page transitions, expandables)
Easings (motion.easing)
- out: cubic-bezier(0.16, 1, 0.3, 1)
- inOut: cubic-bezier(0.4, 0, 0.2, 1)
- emphasized: cubic-bezier(0.2, 0, 0, 1)
Utility Helper (cn)
In addition to design tokens, @siberui/react exports the cn utility for easy conditional class construction.
import { cn } from '@siberui/react';
// Merge classes safely without conflicts
const className = cn(
'px-4 py-2 rounded-md bg-surface-1 text-fg-muted transition-colors',
isActive && 'bg-signal-cyan/10 text-signal-cyan border-l-2 border-signal-cyan',
customClassName
);API Reference
| Property | Description | Type | Default |
|---|---|---|---|
red, blue, cyan, violet, green, amber, rose, slate, zinc, emerald | Individual 50-950 shade scale objects exported directly for convenient indexing (e.g., red[500], blue[600]). | ColorShadeScale | - |
colorPalette | Combined mapping object of all color shade scales. | Record<string, ColorShadeScale> | - |
colors | Root color tokens object containing surface, signal, text, border, status, glass, glow, motion, and palette. | SiberColors | - |
surface | Surface elevation object (background, level1, level2, level3, level4). | Record<"background" | "level1" | "level2" | "level3" | "level4", string> | - |
signal | Core semantic signal accents (cyan, violet, green, amber, rose). | Record<"cyan" | "violet" | "green" | "amber" | "rose", string> | - |
text | Foreground contrast hierarchy tokens (primary, secondary, muted, disabled, inverted). | Record<"primary" | "secondary" | "muted" | "disabled" | "inverted", string> | - |
border | Border opacity scale (default, strong, accent). | Record<"default" | "strong" | "accent", string> | - |
status | Paired status colors for success, warning, error, info and their muted background variants. | Record<string, string> | - |
cn | Classname utility combining clsx and tailwind-merge. | (...inputs: ClassValue[]) => string | - |
WCAG 2.2 Compliance
WCAG 2.2 Level AA / AAA Compliant Design System
Built to strictly satisfy WCAG 2.2 contrast ratio and keyboard navigation requirements.
- Minimum 4.5:1 Contrast Ratio (WCAG 2.2 AA): All normal body text and secondary labels paired with surface levels satisfy or exceed 4.5:1 contrast ratio.
- Enhanced 7:1 Contrast Ratio (WCAG 2.2 AAA): High-emphasis text and metric displays (using
text.primaryorcyan[500]on dark surfaces) reach up to 12.4:1 contrast ratio. - Keyboard Focus & Accessible Controls (WCAG 2.4.13): Interactive palette swatches include explicit
aria-labelvalues, non-color visual indicators, and visible focus rings.