Market
Pricing
Sign inStart
Field GuideCSS and web
CSS and web

Website colour schemes: choosing colours for a site

A site needs fewer colours than you think, and each one needs a job. Give them roles, check them against each other, and the whole site stays consistent as it grows.

GradientlyVerified Gradiently account·October 1, 2026·5 min read
Cover: Hail Courtyard · GR·VWT9·T2

The short version

  • A website colour scheme works best as a short list of roles: page ground, surface, text, muted text, border, accent and status colours.
  • Most sites need one brand accent, used mainly for buttons and links, with neutrals doing the rest of the work.
  • WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text and interface parts such as input borders.
  • Storing colours as CSS custom properties, or design tokens, lets a whole site change theme by swapping one set of values.
  • A dark theme is a separate set of values for the same roles, not an inversion of the light one.
On this page
The roles every site needsHow to choose website coloursThree website color palettes to start fromContrast rules that keep a site readableCoding your colour scheme as tokensDark mode is its own schemeWhere brand colour goes beyond buttons

A good website color scheme is not a mood board of five favourite colours. It is a short list of roles, each filled by one colour: the page ground, raised surfaces, body text, quieter text, borders, one accent for actions, and red, amber and green for status. Choose your brand accent first, build calm neutrals around it, check every text pairing for contrast, then store the result as CSS variables so the whole site uses the same values.

The roles every site needs

GroundThe page background

Rule of thumb

Slightly tinted rather than pure white or black feels softer
SurfaceCards, panels, menus

Rule of thumb

One step lighter (light theme) or lighter still (dark theme) than the ground
TextHeadings and body copy

Rule of thumb

Very high contrast against ground and surface
Muted text

Used for

Captions, labels, metadata

Rule of thumb

Still at least 4.5:1 against the ground
BorderDividers and input outlines

Rule of thumb

Decorative dividers can be faint; input borders need 3:1
AccentButtons, links, selected states

Rule of thumb

Your brand colour, used sparingly so it means "act here"
StatusErrors, warnings, success

Rule of thumb

Red, amber, green, tuned to sit with your accent
RoleUsed forRule of thumb
GroundThe page backgroundSlightly tinted rather than pure white or black feels softer
SurfaceCards, panels, menusOne step lighter (light theme) or lighter still (dark theme) than the ground
TextHeadings and body copyVery high contrast against ground and surface
Muted textCaptions, labels, metadataStill at least 4.5:1 against the ground
BorderDividers and input outlinesDecorative dividers can be faint; input borders need 3:1
AccentButtons, links, selected statesYour brand colour, used sparingly so it means "act here"
StatusErrors, warnings, successRed, amber, green, tuned to sit with your accent
Seven roles cover most sites. Name colours by role, not by hue, so changing the brand colour later is one edit.

How to choose website colours

  1. 1

    Start with one accent

    Your brand colour, or the one you want people to associate with you. If you don't have one, how to choose brand colours helps.

  2. 2

    Tint the neutrals towards it

    Greys with a hint of the accent's hue feel related to it. A teal brand gets cool, slightly blue greys; a terracotta brand gets warm, creamy ones.

  3. 3

    Decide light, dark or both

    Pick the theme most visitors will see first and design it fully before starting the other.

  4. 4

    Check every text pairing

    Text on ground, text on surface, muted text on both, white on the accent button. Fix anything under 4.5:1.

  5. 5

    Apply 60, 30, 10

    Roughly 60% ground, 30% surfaces and text, 10% accent. The 60 30 10 rule explains the balance.

Three website color palettes to start from

Calm clinic, light. Text on ground is about 15.7:1, muted text 6.1:1, white on the teal button 5.5:1, and the input border just reaches 3:1 on white.
Warm café, light. Espresso on cream is about 15:1; white on terracotta about 5.5:1, so button labels stay readable.
Night studio, dark. Off white text rather than pure white reduces glare; the lilac accent is about 7:1 on the ground, so use dark text on lilac buttons.

Contrast rules that keep a site readable

The WCAG contrast guidelines set the floor: 4.5:1 for normal text, 3:1 for large text (about 24 px, or 19 px bold) and 3:1 for interface components such as input borders and icons that carry meaning. WebAIM's contrast checker tests any pair. Our colour contrast guide covers the reasons and the edge cases.

Common failures

  • Light grey placeholder text used as the only label
  • White text on a pale brand colour such as yellow or sky blue
  • Links that differ from body text by colour alone
  • A pale border as the only outline of a form field
  • Error messages shown only in red

Fixes

  • Real labels above fields, muted text at 4.5:1
  • Dark text on light accents, or a deeper shade of the accent
  • Underline links in body copy, or make them bold
  • Input borders at 3:1 against their background
  • An icon or words alongside the colour

Coding your colour scheme as tokens

Store each role once as a CSS custom property and use only those variables in your styles. Then a dark theme, a seasonal campaign or a rebrand is a change to one block of values, not a search through every file. This is the core idea of design tokens.

css
:root {
  --ground: #f7f9fb;
  --surface: #ffffff;
  --text: #14202b;
  --text-muted: #52606d;
  --border-input: #8a96a3;
  --accent: #0f766e;
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f0e17;
    --surface: #1a1926;
    --text: #ecebf3;
    --text-muted: #a5a3b8;
    --border-input: #6e6b85;
    --accent: #a78bfa;
    --on-accent: #0f0e17;
  }
}

body { background: var(--ground); color: var(--text); }
.card { background: var(--surface); }
.button { background: var(--accent); color: var(--on-accent); }
Roles, not hues. Note --on-accent flips from white to near black, because a light lilac button needs dark text.

Dark mode is its own scheme

Inverting a light palette rarely works. Saturated accents glow too hard on black, shadows disappear, and pure white text causes glare. Build dark mode as a second set of values: a near black ground with a hint of hue, surfaces that get lighter as they rise, softer text, and an accent lightened until it reaches contrast. Dark mode design goes deeper.

Where brand colour goes beyond buttons

If the accent is used only on buttons, the site can feel generic. The answer is not more accent everywhere but one place where the brand gets to be expressive: the hero, a feature band or the footer. A rich gradient in the brand's family works well there, while the rest of the page stays calm and readable.

Harbour Physio
Care that runs on time.
Same week appointments in four clinics
Gradiently · @gradiently

One expressive band at 1920×1080 carries the brand; the rest of the site uses the calm roles above.

A Gradiently Mark can be that expressive layer: a background nobody else has, which picks a type colour from its own palette for each line so headings stay readable. For more on pairings, see colour harmony and hero section design.

Find a gradient that’s only yours

Browse thousands of Marks, design with any of them for free, and claim the one that feels like you.

Browse the Market

Questions people ask

How many colours should a website have?

Usually one brand accent, three to five neutrals for ground, surfaces, text and borders, and three status colours. More than one accent makes it harder to tell what is clickable.

How do I choose a colour scheme for my website?

Start with your brand accent, tint neutral greys towards its hue, decide on a light or dark theme, and check every text pairing for at least 4.5:1 contrast.

What contrast ratio does website text need?

WCAG asks for at least 4.5:1 for normal text and 3:1 for large text and interface parts such as input borders.

Should a website background be pure white?

It doesn't have to be. A very slightly tinted off white often feels calmer and lets white cards stand out as surfaces.

How do I add dark mode to my colour scheme?

Define each colour role as a CSS custom property, then provide a second set of values inside a prefers-color-scheme: dark media query.

Share this guide

Written by GradientlyVerified Gradiently account

The team behind Gradiently, a design tool built around Marks: living gradients that make everything you design look like yours.

See our profile

On this page

The roles every site needsHow to choose website coloursThree website color palettes to start fromContrast rules that keep a site readableCoding your colour scheme as tokensDark mode is its own schemeWhere brand colour goes beyond buttons

Share this guide

Next in CSS and web

CSS backgrounds: colours, gradients and images layered

Keep reading

All CSS and web guides
Colour

Color contrast: readable text for everyone

5 min read

Contrast is the difference between words people read and words people skip. The WCAG numbers in plain English, how to check them, and what changes when the background is a gradient.

CSS and web

Design tokens: one source of truth for colour and type

5 min read

A brand colour that lives in forty files will drift. A token lives in one place and every platform reads from it. Here is how to structure design tokens, name them so they last, and ship them to code and design tools.

Backgrounds

Dark mode design: backgrounds, colour and contrast

5 min read

Dark mode is not light mode inverted. Surfaces, text, accents and gradients all need their own values, and the rules are different from the ones you know.

Find the look that’s only yours.

Every Mark is a living background with one owner. Try an unclaimed Mark, and claim yours when it feels right.

Start designing

Check a certificate

Type a certificate number or a Mark’s code to see who owns it.

Works with ChatGPT and Claude

Ask your AI for a design. It makes it in your Mark, ready to edit.

ChatGPTClaude
How to connect

Product

  • Market
  • Explore
  • Pricing
  • Certificates

Learn

  • Field Guide
  • Help centre
  • What’s new

Developers

  • Overview
  • ChatGPT and Claude
  • API reference
  • API keys

Company

  • About
  • Contact us
  • Sign in

Legal

  • Terms
  • Privacy
  • Refunds
  • Mark protection
  • Cookies
  • All policies
Move through the letters. Each one wears a real Mark.Touch a letter to see its Mark.One name. Ten Marks inside it.
© 2026 Gradiently