How to Choose a Color Palette for Your Website (With AI)
Color is the first design decision a visitor notices — and the first one most founders get wrong. Not because they don't care, but because they pick colors the same way they pick a font: arbitrarily, from a preset, or from whatever "looked fine." The result is a palette that communicates nothing in particular, which is often worse than communicating nothing at all.
A website color palette isn't decoration. It's the emotional context your brand lives inside. It tells visitors whether this is a serious financial tool, a creative studio, a medical practice, or a weekend project. Every color choice either reinforces that message or blurs it.
This guide covers how to choose brand colors deliberately — from color theory foundations to a step-by-step process to implement the palette in CSS and Tailwind. No design background required.
Why Your Color Palette Matters More Than Your Copy
Studies on color and conversion consistently show that color drives decision-making before copy is read. A 2024 study from the Seoul International Color Expo found that 92.6% of consumers consider visual appearance the the primary factor in their purchasing decisions, with color being the top visual factor. The brain processes color in 90 seconds; it takes 2.6 seconds to read body copy on a page.
Color affects trust before comprehension. A professional services firm with a neon green palette signals one thing. A creative agency with a muted navy-and-cream palette signals another. The product didn't change. The palette changed the entire interpretation.
The specific impacts are concrete:
- Brand perception: Warm tones (amber, coral, terracotta) communicate craft, energy, and approachability. Cool tones (navy, teal, slate) communicate precision, reliability, and professionalism. Muted tones communicate sophistication. High-saturation tones communicate boldness or youth.
- Conversion: CTA button color has a measurable effect on click rates. The button must be visible — meaning it must be the most distinctive color on the page — and it must feel appropriate to the action. An "Get Started" button that's the same color as secondary elements doesn't pull its weight.
- Emotional consistency: A palette that shifts in meaning across sections (warm hero, cold testimonials, flat pricing) creates cognitive dissonance. A strong palette holds together across the entire page.
Color Theory Basics: The Four Schemes That Work
You don't need to understand color theory deeply to build a good palette. You need to understand the four schemes that appear in professional design work consistently:
Complementary
Two colors opposite each other on the color wheel. High contrast, high energy. Works well for a primary + CTA pairing (blue background, orange button) or a dark mode accent (dark surface, bright complementary accent). The risk: complementary pairs that are too saturated fight each other and cause visual fatigue.
Analogous
Three or more adjacent colors on the wheel (e.g., teal, cyan, blue). Cohesive and comfortable. Used by brands that want to communicate calm, trust, or consistency — banking, healthcare, productivity tools. The risk: analogous palettes can feel flat or undifferentiated if the contrast isn't high enough between adjacent colors.
Triadic
Three colors evenly spaced on the wheel (e.g., red, yellow, blue). High energy, rich visual variety. Best for brands that want to project creativity, vibrancy, or youth — without the harsh contrast of a complementary pair. The risk: triadic palettes require careful balancing to avoid looking chaotic.
Split-Complementary
Your primary color plus the two colors adjacent to its complement. Gives you the contrast benefit of complementary without the intensity — easier to balance, more flexible for a full system. This is the scheme most professional designers reach for first when building from scratch.
Complementary: opposite on wheel | Analogous: adjacent on wheel | Triadic: evenly spaced (3 apart) | Split-comp: primary + two adjacents to complement. Adobe Color (color.adobe.com) has a free wheel tool you can use to generate each scheme from a single base color.
Common Mistakes That Break Color Palettes
The three mistakes below appear in the majority of color choices made without a deliberate process. Each one has a specific fix.
Mistake 1: Too Many Colors
A "palette" with six or seven distinct hues isn't a palette — it's noise. Every additional color dilutes the meaning of the others. A strong palette has one primary (your main brand expression), one secondary (supporting tone, usually a desaturated version of primary or its complement), one accent (the color that draws the eye — used sparingly for CTAs and highlights), and neutral tones for text and backgrounds. That's five colors. If you're at seven or more, start removing.
Mistake 2: Poor Contrast Between CTA and Background
The most common conversion killer. Your CTA button is the same color as your secondary elements — or close enough that the eye doesn't separate them immediately. The fix is simple: your accent color must be the most saturated color on the page, and it must have sufficient contrast against its background. Run every accent/background combination through a contrast ratio check before committing. (More on this below in the WCAG section.)
Mistake 3: Ignoring Accessibility
Picking a color palette without checking contrast ratios means you're building a site that's either legally risky (WCAG lawsuits are real and increasing) or simply unusable for the 8% of men with color vision deficiency. Accessibility isn't a compromise — a palette that passes WCAG AA is almost always a stronger design choice than one that doesn't. The contrast check takes 30 seconds. There's no excuse for skipping it.
Step-by-Step: Building Your Palette
Follow this sequence in order. Each step informs the next.
Step 1: Define What Your Brand Should Signal
Before opening a color wheel, answer three questions: What industry are you in? (Tech, finance, healthcare, food, creative — each has established color conventions you can use or subvert.) What emotion should dominate? (Trust, energy, calm, authority, playfulness.) And who is the audience? (A B2B SaaS buyer and a DTC fashion consumer have completely different color expectations.)
Write one phrase: "This palette should make visitors feel [emotion] and signal [industry/market]." That phrase is your filter for every color decision that follows.
Step 2: Pick Your Primary Color
Your primary color is your brand's main expression. It appears in your logo, your headline accent, your primary buttons, and your most prominent brand element. It should be directly connected to the emotion you're signaling:
- Trust and reliability: Navy (#1e3a5f), deep teal (#0d6e6e), slate blue (#3d5a80)
- Energy and creativity: Coral (#e07a5f), amber (#e8a44a), tangerine (#f4a261)
- Growth and calm: Sage (#7c9a8e), forest green (#2d6a4f), muted blue-green (#4a8c8c)
- Bold and modern: Electric blue (#2563eb), violet (#7c3aed), hot pink (#ec4899)
Pick one. Not two. One primary color.
Step 3: Derive Secondary and Accent
From your primary, use a split-complementary or analogous scheme to derive two supporting colors. Your secondary should be a lighter or darker tint of your primary (creates cohesion without competition). Your accent should be a complementary or near-complementary tone — it exists to draw the eye, so it must be noticeably different from primary.
Primary: pick your brand's core hue
Secondary: tint (add white), shade (add black), or desaturate the primary
Accent: pick the complement — or one step away from it — and make it noticeably more saturated
Step 4: Define Your Neutrals
Neutrals are where most palettes fall apart. A neutral that doesn't relate to the primary feels arbitrary. A neutral that's too warm or too cool compared to the brand tone creates dissonance.
For dark-themed sites (like Forma): use very dark backgrounds (#08080a to #0d0d10), slightly lighter surfaces (#111114), and cool dark grays (#1e1e24) for borders. Keep neutrals cool (slight blue undertone) rather than warm (slight orange undertone) unless your brand is deliberately warm.
For light-themed sites: use warm whites (#fafaf8) or neutral grays (#f5f5f4) for backgrounds. Keep text in near-black (#1a1a1a) with reduced opacity for secondary text.
Step 5: Check Contrast Ratios
Run your five key pairs through a contrast checker. Every pair below is non-negotiable for an accessible palette:
- Primary button text on primary button background (or white text on your primary color)
- Body copy on background
- Accent button text on accent button background
- Nav text on background
- Footer text on background
Target WCAG AA as your minimum. For large text and UI components (buttons), that's a 3:1 ratio minimum. For body copy, 4.5:1. For AAA (highest accessibility), 7:1. If a pair fails, adjust the lighter color — increase saturation or shift hue, not just brightness.
Skip the manual work — generate your palette instantly.
Describe your brand in a sentence. Get a complete 5-color palette — hex values, WCAG contrast ratios for all key pairs, CSS variables, and a live preview of your colors in action. No signup, no download.
Generate your color palette free →WCAG Accessibility: What Contrast Ratios Actually Mean
The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios for text and UI elements. These aren't arbitrary numbers — they're based on the contrast sensitivity of people with low vision, which affects roughly 1 in 12 men and 1 in 200 women (color vision deficiency), plus a much larger population with age-related vision decline.
Contrast ratio is calculated by comparing the relative luminance of foreground and background colors. The scale runs from 1:1 (same color) to 21:1 (white on black). Here's what the levels mean:
AA compliance is the legal minimum in most jurisdictions and the practical standard for production sites. AAA compliance is aspirational — it requires nearly-black text on near-white backgrounds, which can feel stark for brands that want a softer aesthetic. AA is the right target for most sites.
If you're using a dark-themed design: your text is light (high luminance), your background is dark (low luminance) — contrast is usually excellent. The risk in dark themes is accent buttons on dark surfaces, where the accent color might be too dark or too similar to the surface to pass AA.
Implementing Your Palette: CSS Variables
Once you have your five colors, the cleanest implementation is CSS custom properties. Define them once at the root, and reference them throughout your stylesheet. This makes palette changes trivial — you change five values, everything updates.
/* Example CSS palette — replace with your values */ :root { --primary: #1e3a5f; /* Navy — brand core */ --secondary: #3d5a80; /* Slate — supporting tone */ --accent: #e8a44a; /* Amber — CTA, highlights */ --bg: #08080a; /* Dark background */ --surface: #111114; /* Card/surface */ --border: #1e1e24; /* Borders, dividers */ --text: #e8e6e3; /* Primary text */ --text-muted: #8a8a8f; /* Secondary text */ --text-dim: #5a5a60; /* Tertiary text, captions */ } /* Usage: */ body { background: var(--bg); color: var(--text); } .btn-primary { background: var(--accent); color: #08080a; } .card { background: var(--surface); border: 1px solid var(--border); }
Implementing Your Palette: Tailwind Config
If you're using Tailwind CSS, add your palette to the tailwind.config.js extend section. This lets you use utility classes like bg-primary, text-accent, and border-surface throughout your markup.
// tailwind.config.js module.exports = { theme: { extend: { colors: { primary: '#1e3a5f', secondary: '#3d5a80', accent: '#e8a44a', surface: '#111114', border: '#1e1e24', bg: '#08080a', }, fontFamily: { heading: 'Space Grotesk', body: 'DM Sans', }, }, }, }
Pair this with your CSS variable setup so both utility classes and arbitrary CSS values reference the same source of truth. A palette defined in one place and used in two systems (CSS vars + Tailwind) requires a single update in one file.
Build Your Palette With AI, or Build It Yourself
The process above takes 20–30 minutes for someone who knows what they're doing. The WCAG contrast checks, the color theory filter, the neutral derivation — it's all learnable and doable by hand. If you're comfortable with that investment, there's no reason to use a tool.
If you want it faster: the free Color Palette Generator takes a brand description and generates the full 5-color palette — primary, secondary, accent, background, and text — with WCAG contrast ratios checked for all five key pairs, CSS variables ready to copy, and a live preview showing the palette applied to a real landing mockup. It handles the theory so you don't have to think about it.
Either way: whatever palette you land on, check the contrast ratios yourself before committing. It's 30 seconds that prevents a problem you'll spend an hour fixing later.
A website color palette isn't a set of arbitrary colors — it's a system. One primary that signals your brand, a secondary that supports it, an accent that draws the eye, and neutrals that hold the whole thing together. Pick deliberately, check contrast, define in one place (CSS vars), and let the system do the work. A palette built on intention will always beat one assembled by accident.
Let Forma build your whole app around it.
Give Forma your brand description and the palette you've chosen — or let Forma generate one for you. It builds the complete design system, typography, layout, and hierarchy to match. First generation is free.
Try Forma free →