Website Color Palette: How to Build One That Works in 2026
How to build a website colour palette with clear roles, passing contrast and dark mode support, with the real palettes from four live templates.

A good website color palette has three to five colours with fixed jobs: a background neutral, a text colour, one brand or primary colour, and one accent for actions, plus a few greys and state colours. Every text pairing must pass WCAG contrast: 4.5:1 for body text, 3:1 for large text and controls.
This guide walks through choosing those colours, assigning them roles, checking the numbers and adding dark mode. The examples at the end are the actual colour tokens we read today from the stylesheets of four live Waida Studio templates, with contrast ratios measured using the WCAG formula, so you can open the demos and see each palette in use.
What Is a Website Color Palette?
A website colour palette is the fixed set of colours a site is allowed to use, each with a defined role. It is not a mood board. A working palette says which colour is the page background, which is body text, which marks a link or button, and which signals an error, so every new page and section is coloured the same way.
On a built site, the palette usually lives as named variables: CSS custom properties in code, or saved colour styles in a visual builder. Naming colours by role (primary, text, surface) rather than by hue (green, purple) makes it far easier to swap the palette later without hunting through every section.
How Many Colours Should a Website Use?
Most websites need one or two brand colours, one accent, and a neutral scale of four to eight greys. That sounds like a lot, but the neutrals do most of the work: backgrounds, borders, secondary text and cards. The brand and accent colours should appear rarely enough that they still mean something when they do.
Role | What it does | Typical count |
|---|---|---|
Background / surface | Page background, cards, alternating sections | 2–3 shades |
Text | Headings, body copy, secondary text | 2–3 shades |
Brand / primary | Logo colour, key headings, primary buttons | 1, sometimes with a lighter tint |
Accent | Calls to action, highlights, active states | 1 |
Border / stroke | Dividers, input outlines, card edges | 1–2 |
State | Success, warning, error, info messages | 3–4, used only for feedback |
If a palette has many accents, give each one a narrow job, such as one pastel per service or one colour per pricing tier, rather than letting them appear anywhere. The Mariq palette further down is a working example of that wider approach.
The 60-30-10 Rule, Adapted for Screens
The 60-30-10 rule is a proportion guide borrowed from interior design: about 60 parts dominant colour, 30 parts secondary, 10 parts accent. On a website, the 60 is your background neutral, the 30 is text, cards and secondary sections, and the 10 is buttons, links and highlights. It is a starting point, not a measurement to hit.
The rule is most useful as a warning. If your accent colour fills a hero background, every button and every icon, it stops guiding the eye to the one action that matters. Keep the accent for the things you want clicked, and let neutrals carry the layout. Our guide to homepage design principles covers how that hierarchy plays out on the page that gets the most visits.
How to Build a Website Color Palette in Six Steps
Start from the brand colour you already have, build neutrals around it, then test every pairing before any design work. Doing the contrast checks first saves you from redesigning buttons later, because a brand colour that fails against white usually needs a darker shade for text and buttons.
- Pick the primary. Use the existing logo or brand colour. If there is none, choose one hue that fits the sector and the tone you want.
- Build the neutrals. Choose a near-white background, a near-black text colour and three to five greys in between. Slightly tinting greys towards the primary hue makes them feel related.
- Choose one accent. It should stand out clearly from the primary, often a complementary or brighter hue. This is your call-to-action colour.
- Make shades. For the primary and accent, make a darker shade for text and hover states and a pale tint for backgrounds and badges.
- Test contrast. Check every text and background pairing you plan to use against the WCAG thresholds in the next section, using a tool such as the WebAIM contrast checker.
- Name and save the tokens. Store each colour as a named variable by role, then build every page from those names only.
Pair this with your type choices early. Colour and fonts set the tone together, and our guide to website fonts covers the typography half of the same decision.
Contrast: The Numbers Your Palette Must Pass
WCAG 2.2 sets the minimum contrast ratios. Under Success Criterion 1.4.3, body text needs at least 4.5:1 against its background and large text at least 3:1. Large means 18 point, or 14 point bold. The W3C treats these as hard thresholds: a computed 4.499:1 does not pass 4.5:1.
Two more criteria affect palettes directly. Non-text Contrast (1.4.11) asks for 3:1 for the visual parts of controls, such as input borders and focus rings, against adjacent colours. Use of Color (1.4.1) says colour must not be the only way information is shown, so a red border on an invalid field also needs an error message.
What you are colouring | Minimum ratio (WCAG AA) | Criterion |
|---|---|---|
Body text, links in text, button labels | 4.5:1 | 1.4.3 Contrast (Minimum) |
Large text (18pt, or 14pt bold) | 3:1 | 1.4.3 Contrast (Minimum) |
Input borders, focus rings, icons that carry meaning | 3:1 against adjacent colours | 1.4.11 Non-text Contrast |
Logos and pure decoration | No requirement | 1.4.3 exception |
Errors, required fields, chart series | Not by colour alone | 1.4.1 Use of Color |
Bright brand colours are where palettes usually fail. A saturated orange or mid green often looks strong but measures near 3:1 against white, which is fine for a big heading and not fine for a button label. The usual fix is dark text on the bright colour, or a darker shade of the same hue for anything small.
Dark Mode and Colour Tokens
Dark mode works best when your palette is already stored as role-named tokens. You then define a second set of values for the same names and switch them, rather than recolouring each section. A dark palette is not an inverted light one: use a very dark grey or tinted near-black for the background and soften pure white text slightly.
In code, CSS custom properties hold the tokens. The prefers-color-scheme media query detects whether the visitor has asked for a dark interface, and MDN lists it as widely available. Setting the color-scheme property tells the browser to match its own form controls and scrollbars to your theme.
The newer light-dark() function takes two colours and returns the right one for the active scheme, without a separate media query. According to MDN, it only works when `color-scheme` is set to `light dark`, usually on `:root`. Recheck contrast for the dark values too: a brand colour that passes on white can fail on near-black.
Four Real Palettes From Waida Templates
These are four of our own Waida Studio templates, so treat them as examples rather than a neutral review. The colour values come from each template's live stylesheet, read today, and the ratios were calculated with the WCAG relative-luminance formula. They show four different strategies: monochrome, one brand hue, dark with two accents, and many accents.
Zelda: Monochrome

Zelda's root variables define no brand accent at all. The palette is near-black #060606, white, a mid grey #838383, three dark greys (#151515, #1e1e1e, #353535) for layered surfaces, and two stroke greys (#2b2b2b and #a6a6a6). The grey on the near-black background measures 5.34:1, so it passes for body text.
A monochrome palette suits agencies and studios whose project images bring the colour. Zelda is free on every platform, Figma file included, with a free Waida account.
Medonix: One Brand Hue

Medonix builds everything around one green. The primary is #2b7f5c, with a brighter #33a475, a pale green-blue tint #d0f4e5 for soft backgrounds, a text grey #6a6e6e and light neutrals from #f6f6f6 to #f9f9f9 plus an #eee stroke.
The numbers show why the shades matter. White on the primary measures 4.89:1 and passes for button labels, and the grey on white measures 5.16:1. The brighter #33a475 measures 3.13:1 on white, so it belongs on large text and icons, not small copy. Medonix is also free everywhere with a free account, Figma included.
Gemento: Dark With Two Accents

Gemento is a dark SaaS template. Its palette is a navy-tinted near-black #05051f, a violet primary #7945ff, a pink secondary #ff89e3, two greys (#737a88 and #9b9ba5) and white. The pink on the dark background measures 9.48:1, and the lighter grey 7.28:1.
The violet is the interesting case: 5.11:1 on white but 3.92:1 on the dark navy, so on dark sections it suits large headings and buttons with white labels rather than small violet text. Gemento costs $39 for HTML and $49 for Next.js or Astro; the Figma file is $19 separately.
Mariq: Many Accents, One Anchor

Mariq takes the opposite approach to Zelda. Around a near-black #070515 and white, it defines seven accents: orange #ff5f2e, yellow #fdf070, green #c6ff7c, light blue #b4dbff, light purple #c7caff, pink #f6c2f4 and a pale yellow #fdfae7. The near-black on the green measures 17.28:1 and on the orange 6.65:1.
White on that orange measures only 3.03:1, which is the classic bright-accent trap: use dark text on it, not white, for anything below heading size. Mariq is free on Framer, $79 on Webflow, $39 for HTML and $49 for Next.js or Astro.
Common Website Colour Palette Mistakes
Most palette problems come from too many colours with no assigned roles, or from bright colours used for small text. Each of the mistakes below is quick to spot with a contrast checker and a look at how often the accent appears on a typical page.
- Grey body text that is too light. Pale greys look refined in a mock-up and fail 4.5:1 in practice. Check the exact hex value, not the impression.
- White text on a bright brand colour. Yellows, oranges, light greens and cyans rarely reach 4.5:1 with white. Use dark text or a darker shade.
- The accent everywhere. If every icon and heading uses the accent, the main button no longer stands out.
- Colours named by hue. A variable called `green` becomes wrong the day the brand moves to blue; `primary` does not.
- State shown by colour alone. Pair red and green with icons, text or patterns, as WCAG 1.4.1 requires.
- Dark mode as an afterthought. Without tokens, a dark theme means recolouring every section by hand.
Templates to start from
All 46 templatesFrequently asked questions
How many colours should a website colour palette have?
Most sites work well with one or two brand colours, one accent, a neutral scale of four to eight greys, and a few state colours for success, warning and error messages. The neutrals do most of the work.
What contrast ratio does website text need?
Under WCAG 2.2 Success Criterion 1.4.3, body text needs at least 4.5:1 against its background and large text (18 point, or 14 point bold) needs at least 3:1. The thresholds are not rounded, so 4.49:1 fails.
What is the 60-30-10 rule for websites?
It is a proportion guide: about 60 parts dominant colour (usually the background neutral), 30 parts secondary colour (text, cards, sections) and 10 parts accent (buttons and links). Treat it as a starting point, not a strict measurement.
Can I use white text on a bright brand colour?
Only if the pairing measures at least 4.5:1, or 3:1 for large text. Bright yellows, oranges and light greens usually fall short with white, so use dark text on them or a darker shade of the same hue.
How do I add dark mode to a website colour palette?
Store each colour as a role-named token, define a second set of values for a dark theme, and switch them with the prefers-color-scheme media query or the CSS light-dark() function. Then recheck contrast for every dark pairing.
A website colour palette is a short list of colours with fixed roles, saved as tokens and checked against 4.5:1 and 3:1 before anything is designed. Pick the primary, build neutrals around it, add one accent, make shades, test, then name everything by role. That order prevents most of the redesigns that bad palettes cause, and it makes a dark theme a values swap rather than a rebuild. For more on the visual basics, see our design guides.
If you would rather start from a palette that already passes, Zelda and Medonix are free on every platform with a free account, and the rest of our free website templates are a quick way to compare approaches. Our template customisation service swaps a template's palette for your brand colours as part of a $499 one-time package with 7-day delivery.
More from Kazi
Related articles
More in Design CraftWebsite Layout: Patterns That Work and When to Use Them in 2026
The common website layout patterns, which pages each one suits, how people scan them, and the grid, line-length and mobile reflow rules that keep a layout usable.

404 Page Design: What a Good Error Page Needs in 2026
What a 404 page should say and link to, why it must return a real 404 status code, and how to build and test one in Framer, Webflow, Next.js and Astro.

FAQ Page Design: What Works in 2026
How to choose, write, group and lay out the questions on an FAQ page, build an accordion everyone can use, and what FAQ schema still does in 2026.