Building real palettes
From theory to practice — construct functional, accessible color systems.
Anatomy of a functional palette
A functional palette isn't just pretty colors — it's a system of roles. Whether you're designing an interface, a brand identity, an illustration, or a printed piece, you need: a primary (dominant identity color), a background/surface (the canvas), a foreground/text color (readable on the surface), an accent (emphasis and highlights), and semantic colors (status or meaning cues).
Each role needs multiple shades for variations — hover states, borders, subtle backgrounds, tonal depth. Generate these systematically from your base colors using HSL lightness steps rather than hand-picking unrelated values.
| Role | Purpose | Example source |
|---|---|---|
| Primary | Identity, dominant color | Base hue at 50% L |
| Surface | Canvas / background | Near-white or near-black |
| Foreground | Text, key elements | High contrast on surface |
| Accent | Highlights, emphasis | Complement or analogous |
| Semantic | Status, meaning cues | Conventional hues (green/amber/red/blue) |
A minimal functional palette needs at least these five roles:
Generating shades systematically
Don't pick shades by feel. Start with your base color at 50% lightness (the purest expression of the hue), then step lightness in even increments to generate a scale: 95%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%. Keep hue and saturation constant.
This gives you a predictable ramp where each step has a known luminance relationship to its neighbors — essential for consistent hover states, borders, and layered surfaces.
When generating a systematic shade scale, you should keep which HSL axes constant?
Adapting across light & dark contexts
Switching between light and dark contexts isn't just inverting colors. Surfaces flip (light → dark), foreground flips (dark → light), but your primary and accent hues stay the same — adjust their lightness to maintain contrast on the new surface.
A common mistake: using pure black (`#000`) for dark backgrounds. Use a dark grey (`#121212` to `#1a1a2e`) instead — it reduces eye strain, preserves depth cues from shadows, and provides a more comfortable viewing experience.
Light context
- Surface
- ~95–100% L
- Foreground
- ~10–20% L
- Primary
- Base hue, 40–50% L
- Borders/dividers
- ~85–90% L
Dark context
- Surface
- ~5–12% L
- Foreground
- ~85–95% L
- Primary
- Same hue, 55–65% L
- Borders/dividers
- ~15–25% L
For dark backgrounds, you should generally avoid…
When adapting a palette from light to dark context, your primary color should…