color-system

Installation
SKILL.md

Color System

Produces a palette that works in a product, not just in a swatch: ramps with predictable lightness, roles that say where each color goes, and a pair table proving that every text and UI combination passes contrast in light and dark.

When to use

  • "Generate a palette from this brand color" or "give me shades 50–950"
  • The codebase has a dozen near-identical grays and blues
  • Adding success, warning, error and info states
  • A brand color fails contrast as text or as a button background
  • Preparing colors for a dark theme (then continue with dark-mode)

Workflow

  1. Gather the seed: brand hex, or industry and adjectives if none exists, plus any existing scale (Tailwind or custom). Convert the seed to OKLCH and find the step whose target lightness is closest; the seed keeps its exact value at that step.
  2. Build the brand ramp: 11 steps, constant hue, lightness from the target table, chroma peaking at 500–600 and tapering toward 50 and 950. Clamp every step into the sRGB gamut.
  3. Build the neutral ramp on the same lightness targets, tinted toward the brand hue at chroma 0.005–0.015.
  4. Build semantic ramps on the same targets: success hue ≈ 145–150, warning ≈ 70–85, danger ≈ 25–30, info ≈ 240–260 (OKLCH degrees). Shift any that collide with the brand hue.
  5. Assign roles for light and dark: background, surface, text (primary, secondary, disabled), border (subtle, strong), accent (action, link, focus) and semantic (subtle bg, border, solid, text).
  6. Compute WCAG 2 contrast for every pair that is actually used; fix failures by moving steps, not by inventing new colors.
  7. Hand the result to design-tokens for export.
Installs
5
First Seen
12 days ago