Let me be honest with you: most color advice on the internet is vague. "Use complementary colors." "Stick to three colors." "Make sure your CTA pops." These rules are fine as starting points, but they don't tell you why they work or how to adapt them when you're staring at a real project with real constraints.
This guide is different. I'm going to walk through the actual decision process — the one I use working on real websites — starting from zero and ending with a color palette you can drop directly into your CSS. We'll cover the psychology behind color choices, the mechanics of building harmonious palettes, and the accessibility requirements that are no longer optional.
And because theory without tools is frustrating, I'll link to our free color picker, color wheel, and image color extractor throughout — so you can actually try things as you read.
Why Color is the Most Loaded Design Decision You'll Make
Color affects behavior. This isn't marketing fluff — there's decades of research showing that color influences how people perceive trustworthiness, urgency, warmth, and value. A red button genuinely does convert differently from a green one in certain contexts. A blue financial app feels more credible than an orange one to many users, even if they can't articulate why.
But here's what most "color psychology" articles get wrong: context matters more than the color itself. Red means urgency in a sale banner. Red means danger in an error message. Red means passion in a wedding website. The same hue communicates completely different things depending on what surrounds it and who's reading it.
This is why I always start a color decision by asking: What does this brand need people to feel, and who are those people? A fintech app targeting older users in the US has entirely different needs from a children's education app in Southeast Asia.
Context matters more than the color itself. Red means urgency, danger, or passion — depending entirely on what surrounds it.
— The principle that changes how you think about every color decisionThe 60-30-10 Rule (And When to Break It)
The 60-30-10 rule is the classic starting framework for color distribution in UI design. The idea is simple: 60% of your interface uses a dominant color (usually a neutral like off-white, light gray, or a very light tint of your brand color), 30% uses a secondary color (often a complementary or analogous partner to your primary), and 10% uses an accent color (your CTA color, highlight color, or the most distinctive brand hue).
In practice, this means your background, body copy areas, and content cards make up the 60%. Your navigation, section backgrounds, and supporting elements make up the 30%. And your buttons, links, highlights, and attention-grabbers make up the 10%.
60% dominant neutral · 30% secondary · 10% accent. Click any swatch to copy.
The rule works well because it forces visual hierarchy. When your accent color only appears 10% of the time, it has impact when it does appear. When everything is equally colorful, nothing stands out.
Break this rule when your brand's core message requires something different. Dark-mode-first apps often invert the relationship. Games and entertainment products sometimes work with high density of the accent color. Abstract art platforms might use equal color weights intentionally. Know the rule first, then decide if your project genuinely needs to break it.
Building a Palette From Scratch: The Step-by-Step Process
Step 1: Choose your primary brand color
Your primary color is usually your brand's most recognizable hue — the one that would appear on a business card or in a logo. If you're designing from scratch, start with the emotional profile of the brand and work backward to a hue. Use our color wheel to explore how different hues sit in relation to each other before committing.
A quick hue guide based on common brand associations: Blues (trust, stability, professionalism — finance, healthcare, enterprise software). Oranges and reds (energy, urgency, appetite — food, retail, startups). Greens (nature, health, growth — wellness, sustainability, finance). Purples (creativity, luxury, premium — beauty, technology, education).
Step 2: Define your lightness scale
Before you think about shades and tints, decide on your lightness scale — how many steps you need between near-black and near-white. Most UI systems need around 9–11 steps per color. Use our color picker's HSL mode to generate these systematically: keep the hue and saturation constant while stepping the lightness from around 10% to 95%.
Step 3: Pick your neutrals with care
Most designers pick pure grays for neutrals and then wonder why their palette feels cold or disconnected from the brand. The solution is chromatic neutrals — grays that have a very slight tint of your primary brand color. A neutral like #f7f6f2 (with a faint warm yellow tint) will feel cohesive with an orange brand color in a way that pure #f7f7f7 doesn't.
Set your neutral hue to match your primary brand hue, then reduce the saturation to 3–6%. The result is a gray that still reads as neutral but carries the warmth (or coolness) of your brand palette. This small detail makes finished UIs feel much more considered.
Step 4: Add supporting colors intentionally
Most interfaces need at least four functional colors beyond the brand palette: a semantic green for success states, a red for errors, a yellow or orange for warnings, and a blue for informational messages. Don't just pick any red, green, blue, and yellow — pick ones that share the same lightness level and saturation energy as your primary brand color. A muted, desaturated brand palette paired with a bright neon red error color will look jarring.
Accessibility Is Not a Checklist Item
Here's where most color palette tutorials drop the ball: they cover aesthetics but skip accessibility entirely. In 2025, this isn't acceptable. WCAG contrast requirements are legal requirements for many organizations, and even where they're not legally required, accessible color choices simply mean more people can read your content.
The WCAG AA standard requires a minimum contrast ratio of 4.5:1 for normal body text and 3:1 for large text (18px+) and UI components. AAA requires 7:1. These numbers sound arbitrary until you understand what they mean: at 4.5:1, someone with moderately reduced vision — like the contrast loss that comes with normal aging — can still read your text comfortably. At 7:1, most people with low vision can read it.
Use our contrast checker to test every text-on-background combination in your palette before you finalize it. Test your primary button (brand color background + white text), your body text (text color on background), and any link colors against the surfaces they'll appear on. Don't forget to check dark mode too.
Getting Your Palette Into CSS Properly
The biggest practical mistake I see in production codebases is hard-coded color values scattered across stylesheets. You'll update a primary color in 60 places instead of one, and you'll miss some of them every time. The solution is CSS custom properties (CSS variables) defined in :root.
Here's the pattern I use for every project — it's slightly verbose but pays dividends as the project grows:
:root {
/* Brand */
--color-primary-500: #e8400a;
--color-primary-400: #f05a2a;
--color-primary-600: #c73408;
/* Neutral */
--color-neutral-50: #fafaf8;
--color-neutral-100: #f3f2ef;
--color-neutral-900: #1a1916;
/* Semantic */
--color-success: #16a34a;
--color-error: #dc2626;
--color-warning: #d97706;
--color-info: #2563eb;
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
:root {
--color-neutral-50: #1a1916;
--color-neutral-900: #fafaf8;
}
}
Notice the numeric suffix on brand colors (400, 500, 600). This mirrors the convention used by Tailwind CSS and Radix — each number represents a lightness step, with 500 as the base. You can expand the scale in either direction without renaming anything. Using this convention also makes it easier to onboard other developers who are already familiar with it.
From these tokens, you then define semantic color variables that map tokens to purposes:
:root {
--bg-page: var(--color-neutral-50);
--bg-card: #ffffff;
--text-primary: var(--color-neutral-900);
--text-muted: var(--color-neutral-500);
--border: var(--color-neutral-200);
--accent: var(--color-primary-500);
--accent-hover: var(--color-primary-600);
}
When your client decides the orange should be teal six months from now, you change two hex values. Everything else follows automatically.
Dark Mode: Not Just an Inversion
A lot of developers implement dark mode by inverting lightness values or slapping a dark background on everything. This looks wrong because it is wrong. Colors behave differently on dark backgrounds — vibrant colors become overwhelming, subtle colors disappear, and pure white text on pure black creates uncomfortable halation for many users.
Good dark mode means reducing saturation slightly (especially for brand colors), using dark gray surfaces rather than true black, and lowering text opacity rather than using pure white. Our recommended approach: use #141412 instead of #000000 for the darkest surface, and rgba(240,239,232,.9) instead of #ffffff for primary text. The slight tinting and reduced opacity reduce fatigue significantly.
Test your dark mode in actual dark conditions — in a dimmed room, on a phone at night. This is when problems with over-saturation and excessive contrast become immediately obvious.
Before You Ship: A Color Palette Checklist
Run through this list before finalizing any color palette for production:
- Primary body text on all background colors passes WCAG AA (4.5:1 minimum)
- All interactive elements (buttons, links) have visible focus states with sufficient contrast
- Error, success, and warning states are distinguishable without relying only on color (for colorblind users)
- The palette has been tested on at least one OLED screen, one Windows sRGB monitor, and one mobile device
- Dark mode has been checked in low-light conditions, not just on a bright monitor in daylight
- All color values are defined as CSS variables — no hardcoded hex values outside the token file
- Brand colors look correct when printed in black and white (important for some industries)
- The palette has been shown to at least one person outside the design team before launch
That last point is worth repeating. Design work develops a kind of familiarity blindness — you've looked at the palette so many times that you stop seeing it clearly. A fresh pair of eyes catches problems that yours will miss.
If you've read this far, you now have everything you need to build color palettes that are both beautiful and functional. Use the color picker to build your scale, the color wheel to find harmonies, and the contrast checker to verify accessibility. The tools are there — the decisions are yours.