Color Tokens

OKLCH color scales and semantic color tokens

Seed Hues

Override these variables to regenerate entire color palettes:

:root {
  --shift-hue-primary: 250;    /* Blue (default) */
  --shift-hue-secondary: 180;  /* Cyan */
  --shift-hue-accent: 30;      /* Orange */
  --shift-hue-success: 145;    /* Green */
  --shift-hue-warning: 45;     /* Amber */
  --shift-hue-danger: 25;      /* Red */
  --shift-hue-neutral: 250;    /* Blue-tinted grays */
}

Tip: Use the floating Theme Customizer (bottom-right corner) to adjust hue values and see changes live across all components.

Color Scales

Each color has an 11-step scale (50-950). The scales are generated from seed hues with perceptually uniform lightness steps.

Primary Scale

Primary color scale

50 100 200 300 400 500 600 700 800 900 950

Neutral Scale

Neutral color scale (brand-tinted grays)

50 100 200 300 400 500 600 700 800 900 950

Status Colors

Success, warning, and danger scales

Success
Warning
Danger

Scale Reference

TokenLightnessUsage
--s-{color}-500.978Lightest backgrounds
--s-{color}-1000.936Hover backgrounds
--s-{color}-2000.881Subtle borders
--s-{color}-3000.827Disabled states
--s-{color}-4000.742Secondary elements
--s-{color}-5000.648Primary interactive
--s-{color}-6000.573Hover states
--s-{color}-7000.469Active states
--s-{color}-8000.394High contrast
--s-{color}-9000.320Near black
--s-{color}-9500.238Darkest

Using Color Tokens

.my-element {
  background: var(--s-primary-100);
  color: var(--s-primary-900);
  border-color: var(--s-primary-300);
}
<div style="background: var(--s-accent-500);">
  Accent background
</div>

Semantic Color Tokens

Semantic tokens map to raw colors and adapt to light/dark mode:

Surface Colors

TokenLight ModeDark ModeUsage
--s-surface-baseneutral-50neutral-950Default backgrounds
--s-surface-raisedneutral-100neutral-900Cards, modals
--s-surface-sunkenneutral-200neutral-800Inputs, wells

Text Colors

TokenLight ModeDark ModeUsage
--s-text-primaryneutral-900neutral-50Main text
--s-text-secondaryneutral-600neutral-400Muted text
--s-text-disabledneutral-400neutral-600Disabled text

Border Colors

TokenLight ModeDark ModeUsage
--s-border-defaultneutral-200neutral-800Default borders
--s-border-strongneutral-400neutral-600Emphasized borders
--s-focus-ringprimary-500primary-400Focus rings

Interactive Colors

TokenLight ModeDark ModeUsage
--s-interactive-primaryprimary-600primary-400Buttons, links
--s-interactive-hoverprimary-700primary-300Hover states
--s-interactive-activeprimary-800primary-200Active states

Brand-Tinted Neutrals

The --shift-hue-neutral variable adds a subtle tint to all gray colors:

/* Default: Blue-tinted grays */
--shift-hue-neutral: 250;

/* Warm grays */
--shift-hue-neutral: 30;

/* Cool grays */
--shift-hue-neutral: 210;

/* Match your primary color */
--shift-hue-neutral: var(--shift-hue-primary);

Customizing Colors

Change Brand Colors

:root {
  --shift-hue-primary: 280;    /* Purple */
  --shift-hue-neutral: 280;    /* Purple-tinted grays */
}

Override Specific Steps

:root {
  /* Make primary-500 more saturated */
  --s-primary-500: oklch(0.65 0.2 var(--shift-hue-primary));
}

Custom Semantic Mappings

:root {
  --s-interactive-primary: var(--s-primary-700);
  --s-surface-base: var(--s-neutral-100);
}

OKLCH Color Format

All colors use the OKLCH color space:

oklch(L C H)
/* L = Lightness (0-1) */
/* C = Chroma (0-0.4) */
/* H = Hue (0-360) */

This ensures perceptually uniform colors across all hues.

Search