Color Design System

How Pixeliro turns one brand color into a complete 46-role semantic token system — covering every UI surface, text style, border, and status color.

Why Semantic Color Tokens?

Hardcoding colors like #6366F1 across hundreds of components creates a maintenance nightmare. When your brand color changes, you search-and-replace across every file. Semantic tokens solve this.

Instead of color: #6366F1, you write color: var(--kit-primary). The token name describes the role, not the color value. Change the value once at the root — every component updates.

The 5 Token Groups

Brand

5 tokens
TokenRoleUsage Examples
--kit-primaryPrimary brand action colorButtons, links, active states
--kit-primary-hoverHover/pressed variantButton hover, link active
--kit-primary-fgText on primary backgroundButton labels, badge text
--kit-secondarySecondary accentTags, secondary buttons
--kit-accentHighlight / attentionBadges, highlights, promotions

Status

4 tokens
TokenRoleUsage Examples
--kit-successPositive outcomeConfirmation, checkmarks
--kit-dangerError / destructiveError messages, delete buttons
--kit-warningCaution / attentionWarnings, unsaved changes
--kit-infoInformationalTips, help text, links

Surface

4 tokens
TokenRoleUsage Examples
--kit-bgPage backgroundBody, main content area
--kit-surfaceElevated cards/panelsCards, modals, dropdowns
--kit-surface-2Nested surfacesInput backgrounds, table rows
--kit-surface-3Deeply nestedSkeleton loaders, dividers

Border

3 tokens
TokenRoleUsage Examples
--kit-borderDefault borderCard borders, dividers
--kit-border-strongEmphasized borderActive inputs, selected items
--kit-border-focusFocus ring colorKeyboard focus indicators

Text

5 tokens
TokenRoleUsage Examples
--kit-textPrimary textHeadings, body text
--kit-text-2Secondary textDescriptions, labels
--kit-text-3Tertiary / mutedPlaceholders, timestamps
--kit-text-disabledDisabled stateDisabled buttons, inactive tabs
--kit-text-inverseText on dark/colored bgButton text, toast text

How Token Generation Works

  1. You pick a primary brand color (e.g. #6366F1)
  2. Pixeliro converts it to HSL and derives secondary (hue +210°, saturation ×0.6) and accent (hue +40°, saturation 0.9)
  3. Status colors are fixed (green/red/amber/blue) — they shouldn't change with your brand
  4. Surface, border, and text tokens use neutral-derived lightness scales — automatically light or dark mode
  5. The result is 28 color tokens + 14 typography + 6 radius + 4 shadow + 6 spacing = 58 total tokens

Light & Dark Mode

The same token names work in both modes. Only the values change:

TokenLightDark
--kit-bg#FFFFFF#0F172A
--kit-text#0F172A#F8FAFC
--kit-surface#F8FAFC#1E293B
--kit-border#E2E8F0#334155

See It in Action

Pick a color and watch 400+ components re-theme instantly.

Open Live Preview