Design Guide · 8 min read

How to Choose a Color Palette for Your Website

A step-by-step guide covering color theory, accessibility, mood, and the practical decisions that make a website color scheme actually work — not just look good in mockups.

Choosing a color palette for your website is one of the most impactful decisions you'll make. Colors signal brand personality before a user reads a single word. They determine whether your interface feels trustworthy or chaotic, premium or cheap, calm or urgent.

This guide walks through every step: from understanding color theory basics, to choosing a mood, to checking accessibility, to using a color palette generator to find combinations that actually work together.

1. Start with one anchor color

Don't start by picking four colors at once — you'll end up with a random assortment that doesn't hold together. Start with one color: your brand color, your primary accent, or a color that represents how you want users to feel.

That anchor color determines everything else. If your anchor is a warm terracotta (#E07A5F), your palette will naturally want warm neutrals and earthy partners. If your anchor is a cool electric blue (#4A90C4), cool grays and white backgrounds will feel right.

Once you have your anchor, the remaining colors in your palette should be chosen using color harmony rules.

2. Understand the basic harmony rules

Color harmony rules are mathematical relationships between colors on the color wheel. They are why some color combinations feel effortless and others feel jarring.

  • Analogous — colors that sit next to each other on the color wheel (e.g. orange, yellow-orange, yellow). Creates smooth, cohesive palettes. Low contrast. Good for backgrounds and brand identity.
  • Complementary — colors directly opposite each other on the wheel (e.g. blue and orange). Creates high contrast and visual tension. Best used as accent vs. background, not both as dominant colors.
  • Triadic — three colors equally spaced on the wheel. Creates vibrant, balanced palettes. Harder to use well — one color must dominate.
  • Split-complementary — one base color plus the two colors either side of its complement. Softer than full complementary, still high contrast. Very practical for web design.

You don't need to calculate these by hand. ihatecolors's generator lets you select a harmony rule and generates theory-correct palettes instantly.

3. Define the four roles in your palette

A functional website color palette needs four things:

  • Background color — the dominant surface (usually 60–70% of the visual space). Typically light or neutral.
  • Primary accent — your brand color. Used for CTAs, links, highlights. Should contrast strongly against the background.
  • Secondary color — a supporting tone for cards, dividers, secondary buttons, illustrations. Quieter than the primary accent.
  • Body text color — near-black or dark gray. Must achieve at least 4.5:1 contrast against your background (see accessibility section below).

A common mistake is treating all four colors as equals. The background should be quiet, the text should be readable, and the accent should do the visual work. Only one color should be "loud" at a time.

4. Choose a mood, not just colors

Color temperature and saturation communicate mood as much as the specific hues. Before picking specific colors, decide how you want your site to feel:

  • Warm (reds, oranges, golds) — energetic, welcoming, appetite-stimulating. Works for food, lifestyle, and consumer brands.
  • Cool (blues, teals, purples) — calm, trustworthy, clinical. Dominant in tech, healthcare, finance.
  • Earthy (browns, sages, warm neutrals) — grounded, artisanal, authentic. Works for sustainability, craft food, wellness.
  • Dark/Night (near-black base with bright accents) — premium, dramatic, high-contrast. Works for creative portfolios, gaming, luxury.
  • Pastel (high lightness, low saturation) — soft, approachable, gentle. Works for beauty, children's, and mental health brands.

Browse palettes by mood on ihatecolors: Warm · Cool · Earthy · Night · Pastel.

5. Check accessibility — WCAG contrast ratios

This is the step most designers skip, and it's the most important one for real-world usability.

WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios between text and background for readable, accessible content:

  • AA level (legal minimum in most countries): 4.5:1 for normal text, 3:1 for large text (18px+ or 14px bold+).
  • AAA level (recommended): 7:1 for normal text.

To pass AA, your dark body text on a light background needs to be high enough contrast. Pure black (#000000) on pure white (#FFFFFF) is 21:1 — passes easily but can feel harsh. Dark charcoal (#2B2D42) on off-white (#F8F8F8) is around 14:1 — passes and looks softer.

ihatecolors shows live WCAG grades (AA, AAA, Fail) for every palette in the generator, so you can catch contrast problems before writing any code.

6. The best background color for a website

Pure white (#FFFFFF) feels sterile and can cause eye strain on high-brightness screens. Most professional sites use a slightly off-white or tinted background:

  • Warm off-white — #FAFAF8, #F9F6F0. Makes warm palettes feel cohesive.
  • Cool off-white — #F8F9FC, #F4F7FF. Works with blues and purples.
  • Neutral light gray — #F5F5F5, #F0F0F0. Safe for any palette.

For dark-mode or dark-background sites, near-black is better than pure black:

  • #0F0F0F, #111827, #1A1A2E — all feel richer and more intentional than #000000.

7. How to extract a color palette from a website you admire

If you've found a site whose colors you love, here's how to extract the palette:

  • Browser DevTools — right-click any element → Inspect → in the Styles panel, look for color properties. Click the color swatch to see the hex value.
  • ColorZilla — a free Chrome/Firefox extension with an eye dropper that works on any webpage.
  • CSS variables — many modern sites define their palette as CSS custom properties. In DevTools, look for :root { --color-primary: ... }.

8. Use a color palette generator to speed things up

You don't need to build your palette from scratch manually. A good website color palette generator like ihatecolors lets you:

  • Pick a mood and get theory-correct options instantly.
  • Lock colors you like and regenerate the rest.
  • See live WCAG contrast scores as you generate.
  • Export hex codes and a ready-to-use AI prompt.

Generate until you find something that feels right — most designers go through 10–30 variations before landing on their final palette.

9. Common website color scheme mistakes

  • Too many accent colors — if everything is bold, nothing is. Limit to one primary accent.
  • Insufficient contrast — light gray text on a white background is unreadable to millions of users with visual impairments.
  • Using red for non-errors — red triggers "something is wrong" in users' brains. Only use it for errors, alerts, and sale prices.
  • Ignoring dark mode — if your site supports dark mode, test every palette against a dark background too.
  • Choosing colors in isolation — always test your palette applied to real UI components: a button, a card, a hero section, a form.

Summary: the practical steps

  1. Pick your anchor (brand) color based on the mood you want to convey.
  2. Apply a harmony rule to generate complementary colors.
  3. Assign roles: background, accent, secondary, text.
  4. Check WCAG contrast ratios — text must pass 4.5:1 AA.
  5. Test on real components, not just color swatches.

Ready to start? Open the ihatecolors Generator — pick a mood, choose a harmony rule, and press Space to generate. Every palette is theory-checked and WCAG-scored for you.


Frequently Asked Questions

How many colors should a website color palette have?

A typical website color palette has 4–5 colors: a background, a primary accent, a secondary accent, a body text color, and sometimes a neutral. Using fewer colors creates clarity; using more creates visual noise.

What is the best background color for a website?

For most websites, a light background (near-white, around #F8F8F8 or a warm off-white) is safest for readability. Dark backgrounds work well for creative, tech, or entertainment brands. Pure white (#FFFFFF) can feel harsh — a slight warm or cool tint is usually better.

What is an accent color on a website?

An accent color is the bold, attention-grabbing color used for buttons, links, highlights, and calls to action. It should contrast strongly against your background. Use only one or two accent colors to maintain visual clarity.

How do I know if my website colors are accessible?

Your text color must achieve at least a 4.5:1 contrast ratio against its background for WCAG AA compliance. ihatecolors shows live WCAG grades on every palette automatically.

How do I extract a color palette from a website?

Use your browser's DevTools (inspect element → Styles panel) or the ColorZilla browser extension to click any element and get its hex value instantly.

What is the best color scheme for an ecommerce website?

Ecommerce sites typically use high-contrast, trust-building palettes. Blue tones signal trust. Warm earthy tones work for artisan or food brands. Black with one accent color is a classic luxury choice. Use red only for sale or urgency signals, never as a background.

Ready to build your palette?

Theory-aware generation, live WCAG scores, and a ready-to-use AI prompt — all free.

Open the Generator →
} } Skip to content > le> > m 0; }