How to choose a color palette for an app: primary, neutral and semantic colors
Picking app colors feels like a branding exercise, but most of an interface is actually neutrals. A palette that works is built in roles, not just favorite hues.
1. Neutrals do most of the work Backgrounds, surfaces, borders, and text. Build a scale (light to dark, often 9–12 steps). Slightly tinting neutrals toward your brand hue can make the interface feel cohesive.
2. One primary color Used for primary actions, links, focus states and key highlights. Restraint matters; if everything is primary, nothing is.
3. Semantic colors
- Success (often green)
- Warning (often amber)
- Error/destructive (often red)
- Info (often blue) Each typically needs a few shades: a background tint, a border, and a strong text/icon version.
4. Accessibility from the start
- Check contrast for text against its background. WCAG AA asks for 4.5:1 for normal text and 3:1 for large text.
- Do not rely on color alone to signal state; add icons or text.
5. Plan for dark mode Dark mode is not just inverting. Saturated colors often need to be lighter and less saturated on dark surfaces, and elevation is usually shown with lighter surfaces rather than shadows.
6. Name by role, not by color
color-danger survives a rebrand; red-500 used directly in components does not.
How many steps do you put in your neutral scale? And do you start from brand colors or from accessibility constraints?
Comments · 3
The neutral point is real. Many developers pick a bright brand color and then wonder why the app feels off. The grays do the heavy lifting.
For early products, I'd say lock the primary and semantic colors early and don't bikeshed beyond that. Consistency beats cleverness.
How do you handle dark mode with this role-based approach? Do you define separate palettes, or derive them from the same roles?