Website color schemes: roles, ratios and real examples

Updated 2026-09-11 · by the ColorSwoop team

A palette is a list of colors. A color scheme is a palette with jobs. Here is how to hand out the jobs.

The five roles every site needs

ColorSwoop's palette pages assign these roles automatically by lightness in the UI preview; use Rotate roles to try alternatives.

The 60-30-10 rule

Background and surfaces take about 60% of pixels, secondary areas about 30%, primary and accent about 10%. If your page looks busy, the accent is probably over 10%.

Example schemes by industry

Implementing it in CSS

Define the roles as custom properties so the scheme lives in one place:

:root {
  --bg: #FFFFFF; --text: #141416;
  --primary: #5B3DF5; --secondary: #E9E5FF; --accent: #FF5C8A;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0F0F12; --text: #F2F2F5; --secondary: #24203F; }
}

Every ColorSwoop palette exports this format (plus SCSS, Tailwind and JSON) with one click.

Dark mode

Swap background and text, keep the primary hue but reduce its saturation 10-20% so it does not vibrate, and raise the lightness of the secondary so cards remain visible. Test both modes with the contrast checker.

FAQ

What is the best color scheme for a website?

The most reliable formula is a neutral background, a dark neutral for text, one primary brand color for actions and one accent for highlights. Trustworthy blues and clean grays dominate SaaS; warm neutrals and terracotta suit lifestyle brands; dark backgrounds with a neon accent suit gaming and developer tools.

How many colors should a website use?

Three to five including neutrals. Two neutrals (background and text), one primary, one accent and optionally one secondary is enough for almost every site.

Should my website have a dark mode?

Increasingly yes. Design the light palette first, then create a dark variant by swapping background and text and slightly desaturating accents so they do not glow.