Step 1: Define your brand character
Before you pick any color, define the emotional and functional character of the brand or product. Use three to five adjectives. Good answers look like:
- Calm, professional, trustworthy, understated — a B2B analytics tool
- Energetic, playful, youthful, bold — a consumer mobile game
- Serious, authoritative, editorial, refined — a law firm or financial publication
- Warm, human, approachable, grounded — a wellness app or nonprofit
These adjectives are what you'll test color choices against. A color that isn't clearly on the right side of these adjectives is probably wrong.
Step 2: Identify your starting point
Three possibilities, in order of preference:
- You already have a brand color. If the brand was defined before the website, use that color as the primary and build around it.
- You have a logo with a color. The logo's color is your primary unless the logo is monochrome or the color is unsuitable for web use (rare but possible — some brand colors fail at 4.5:1 on white).
- You have nothing yet. Then you're designing the brand color as part of the website. Base the choice on step 1's adjectives.
Step 3: Pick your primary color
Your primary color will be used for:
- Primary buttons and calls-to-action
- Links and key navigation
- Active and selected states
- Key brand moments — logo, hero, footer accent
The constraints on your primary color:
- It must meet 4.5:1 contrast on white for text use, and 3:1 as a button background against surrounding neutrals.
- It should not be the same hue as your semantic error color (red) — you want the primary to be visually distinct from a "something went wrong" signal.
- It should work in both light and dark mode. Test both before committing.
Step 4: Build a neutral scale
Neutrals do 80% of a typical UI's work — backgrounds, borders, text, secondary surfaces. You need a disciplined neutral scale of at least 9 steps:
| Step | Typical use |
|---|---|
| 50 | Subtle background, rarely used |
| 100 | Default page background |
| 200 | Subtle surface, hover states |
| 300 | Borders, dividers |
| 400 | Disabled text, placeholder |
| 500 | Secondary text |
| 600 | Body text |
| 700 | Strong text, headings |
| 800 | Deep headings, dark backgrounds |
| 900 | Near-black text |
You don't have to use exactly these steps, but the principle matters: neutrals need to cover enough range that every surface and every text level has a distinct token.
Step 5: Add semantic colors
Every website needs at least four semantic colors:
- Success — typically green (e.g.
#267D70teal or a classic green) - Warning — amber or orange (e.g.
#D97706) - Error/danger — red (e.g.
#B3261E) - Info — blue (e.g.
#1E88E5)
These don't need to be your brand color. They need to be distinguishable from each other and from your primary color, and they need to pass contrast checks at both text and UI levels.
Step 6: Verify accessibility
Before you build anything, check every text/background pair:
- Body text on light background: at least 4.5:1.
- Body text on dark background: at least 4.5:1.
- Large text (18pt or 14pt bold): at least 3:1.
- UI components (buttons, inputs, borders): at least 3:1.
Use our Contrast Checker — it will tell you exactly which combinations fail.
Step 7: Test in context
Colors that look good on a palette card often look different on a real page. Before finalizing:
- Build one full page — typically your homepage or a key landing page — using the palette.
- Look at it on a phone, not just on your laptop.
- Look at it in daylight and in dim light.
- Ask someone who hasn't been staring at it for hours.
The most common problem at this stage is that the palette is too busy. If you've got four brand colors plus a strong accent, you probably need to cut it down.
Step 8: Document and lock it
Once you've committed, document the palette as CSS custom properties and design tokens. Every future color decision should reference those tokens, not invent new values. If you need a new color, add it to the system — don't add it locally.
See our CSS Color Systems article for the specific implementation patterns.