Free, independent guides since 2010

Design

Choosing a colour palette for your website

How to build a website colour palette that fits your brand and works in practice: primary, accent and neutral colours, the 60-30-10 rule, contrast for accessibility, and tools to test your palette.

<guide section="Design" type="article" read="1 min"/>

Colour is the first thing visitors notice and one of the strongest parts of your brand. A good palette is not about finding beautiful colours; it is about a small, consistent system that guides the eye and stays readable. Our older article using color in HTML covers the technical basics.

The building blocks

RoleUseOn this site
PrimaryBrand identity: header, key elementsMaroon from the logo
AccentButtons, links, highlightsA brighter maroon
NeutralsBackgrounds, text, bordersWarm paper tones and near-black ink
Section coloursOrientation per areaPastel per branch
Status coloursSuccess, warning, errorGreen, amber, red in boxes

The 60-30-10 rule

A classic guideline from interior design: about 60% dominant colour (usually a neutral background), 30% secondary colour and 10% accent. It keeps a design calm while making the accent stand out.

Contrast first

Text needs a contrast ratio of at least 4.5:1 against its background (3:1 for large text) to meet WCAG AA. Many brand colours fail as text colour. Test every combination with our contrast checker, and see accessibility basics.

From palette to code

CSS
:root {
  --brand: #6e0a0a;
  --accent: #8f1418;
  --paper: #faf6f0;
  --ink: #231a1a;
  --muted: #65585a;
  --success: #2f6b4f;
  --warning: #b77714;
  --error: #a12a1d;
}

Using CSS variables makes later changes – or a dark mode – easy.

Practical tips

  • Never rely on colour alone to convey meaning; add icons or text.
  • Keep link colours consistent across the site.
  • Test your palette on a cheap phone screen and in bright light.
  • AI can suggest palettes from a description – see designing with AI – but always check contrast yourself.

Frequently asked questions

How many colours should a website have?

Usually one main brand colour, one accent and a few neutrals (backgrounds, text, borders), plus status colours for success, warning and error.

Can I use my logo colours?

Yes, they are the natural starting point – as we did on this site with the maroon of the dom4j logo. Check whether they have enough contrast for text; sometimes a darker shade is needed.