EN

Website Color Schemes: How to Choose a Palette That Works

A designer's desk with a laptop showing a website mockup beside paint swatches and a printed color wheel

Quick Answer

To choose a website color scheme, pick one brand color, add a light neutral background and a dark text color, then reserve a single accent for buttons and links. A common rule of thumb splits the page about 60% neutral, 30% primary and 10% accent. Check that body text reaches at least 4.5:1 contrast before you build anything.

On this page
  1. How do you start a website color scheme?
  2. Which color harmony should you use as a starting point?
  3. How does the 60-30-10 rule work on a real page?
  4. How do you check contrast before you build?
  5. What do four complete website color schemes look like?
  6. How do you test a scheme in a mockup?
  7. Frequently Asked Questions
  8. Our Take
  9. Sources

Key Takeaways

  • Start from one base color and let neutrals do most of the work; a scheme is mostly background and text, not paint.
  • Give every color a job (background, text, brand, action) so you never pick colors by feel on each new page.
  • Check contrast numerically: WCAG asks for 4.5:1 for normal text and 3:1 for large text and interface parts.
  • Bright accents often fail as text on white, so use them as fills with dark text on top.
  • Test the palette in a mockup and in dark mode before you commit.

How do you start a website color scheme?

Start with one color, not five. Most brands already own one: a logo color, a product color, a color from the packaging. If you have none, pick a hue that matches the mood you want, then settle the rest of the scheme around it. This guide uses "color" in US spelling; if you search for "colour schemes", the method is the same.

A working website scheme has four jobs to fill:

  1. Background: a light (or very dark) neutral that covers most of the screen.
  2. Text: a near-black (or near-white) that is easy to read on that background.
  3. Primary: your brand color, used for headers, links, highlights and large shapes.
  4. Accent: one contrasting color for the single action you most want visitors to take.

Fill the neutral and text slots first. They cover most pixels, so they set the tone more than the brand color does. A slightly tinted neutral (a cool off-white like #F8FAFC rather than pure #FFFFFF) feels designed without adding a color to manage. If you want a generated starting point, the palette generator builds a full scheme from one base color, and the neutral palettes show tinted grays to pair with it.

Which color harmony should you use as a starting point?

A color harmony is a rule for picking colors by their position on the color wheel. It does not guarantee a good result, but it gives you a defensible first draft instead of a blank page.

HarmonyHow it worksGood forPage
AnalogousNeighbors on the wheelCalm, cohesive, low-risk sitesAnalogous colors
ComplementaryOpposite sides of the wheelStrong primary plus a pop accentComplementary colors
Split-complementaryOne color plus the two neighbors of its oppositeContrast with less tensionSplit-complementary colors
TriadicThree colors evenly spacedPlayful, colorful brandsTriadic colors

For most websites, complementary or split-complementary is the easiest to apply: one cool brand color and one warm accent. In the SaaS example below, the blue #1D4ED8 sits at a hue of 224 degrees and the amber #F59E0B at 38 degrees, about 187 degrees apart, which is close to the 180 degrees that defines a complement. Treat harmonies as a start. You will adjust lightness and saturation by eye and by contrast number afterward.

How does the 60-30-10 rule work on a real page?

The 60-30-10 rule is a common rule of thumb from interior design, not a web standard. It says roughly 60% of a space uses a dominant color, 30% a secondary color, and 10% an accent. On a website, it translates well:

  • 60%: the neutral background and the text on it.
  • 30%: the primary brand color in headers, footers, cards and links.
  • 10%: the accent, used on the call-to-action button and one or two highlights.

The percentages are guides, not measurements. The useful idea is the hierarchy: the accent only works because it is rare. If every button, badge and icon uses it, nothing stands out.

Website wireframe showing 60-30-10 color roles A page wireframe appears piece by piece: a neutral background, then a blue header and footer, then a single amber button. The final frame shows all three roles with a legend. Logo Get started 60% base #F8FAFC 30% primary #1D4ED8 10% accent #F59E0B
A page wireframe with the 60-30-10 roles: neutral base, blue primary, one amber button.

The wireframe shows the SaaS scheme from the worked examples. Notice that the page text and background are both neutrals, the header and footer carry the primary blue, and the amber button is the only warm shape on the screen.

How do you check contrast before you build?

Contrast ratio is a number from 1:1 (identical colors) to 21:1 (black on white) that compares the brightness of two colors. WCAG, the W3C's web accessibility standard, sets minimums: text needs at least 4.5:1, and large text needs at least 3:1, where large means 18 point or 14 point bold [1]. Text that is part of a logo or brand name has no contrast requirement.

Contrast also applies to more than text. Under success criterion 1.4.11, the visual information needed to identify interface components and states, such as a focus ring, needs 3:1 against adjacent colors [2]. A separate rule says color must not be the only way to convey information, so a required field or an error needs an icon or a text label as well as a red tint [3].

Contrast scale from 1:1 to 21:1 with five example pairs A bar from 1:1 to 21:1 grows from left to right in four zones: under 3:1, 3 to 4.5, 4.5 to 7, and 7 and up. Five example ratios then drop onto it. The final frame shows the full bar with all markers. 1:1 3:1 4.5:1 7:1 21:1 2.05:1 3.38:1 5.81:1 6.40:1 17.06:1 under 3:1: fails 3 to 4.5: large text, UI parts 4.5 to 7: AA body text 7 and up: AAA body text
Where five example pairs land on the 1:1 to 21:1 scale: amber on base 2.05:1, pink on base 3.38:1, violet on base 5.81:1, blue on base 6.40:1, near-black on base 17.06:1.

The scale places five pairs from the examples below. Contrast ratios here come from the SwatchNest color core and are cut off, never rounded up, at two decimals, so a pair shown as 4.49:1 is never presented as passing. You can run any pair yourself in the contrast checker, and the guide on what a good contrast ratio is explains the formula.

Two results surprise people. Amber #F59E0B on #F8FAFC is only 2.05:1, so amber text on a light page fails. But the same amber as a button fill with #0F172A text on top is 8.31:1. The lesson: bright accents belong behind dark text, not in front of a light background.

What do four complete website color schemes look like?

Here are four labeled example schemes, built with the steps above. They are illustrations, not tested brand systems; swap in your own base color and recheck the numbers.

Four example website color schemes side by side A table of swatches with four rows, one per scheme, appears row by row. Each row shows base, text, primary and accent colors with HEX codes. The final frame shows all four rows. BaseTextPrimaryAccent SaaS blue #F8FAFC#0F172A#1D4ED8#F59E0B Wellnessgreen #F6F4EE#1F2A24#2F6B4F#D9822B Creativeviolet #FAFAFC#17172F#6D46D3#EC4899 Dark mode #12121A#EDEDF5#A78BFA#FBBF24
Four example schemes: base, text, primary and accent colors with their HEX codes.

Scheme 1, SaaS blue. Base #F8FAFC (rgb(248, 250, 252)), text #0F172A, primary #1D4ED8 (rgb(29, 78, 216), hsl(224.3, 76.3%, 48%)), accent #F59E0B. Body text on the base is 17.06:1. The primary blue on the base is 6.40:1, and white on the blue is 6.70:1, so it works for links and for button fills. The amber button with #0F172A text is 8.31:1.

Scheme 2, wellness green. Base #F6F4EE (rgb(246, 244, 238)), text #1F2A24, primary #2F6B4F (rgb(47, 107, 79), hsl(152, 39%, 30.2%)), accent #D9822B. Text on the base is 13.49:1, the green on the base is 5.72:1, and white on the green is 6.29:1. The terracotta accent is only 2.65:1 against the base, so it fails as small text there; with #1F2A24 text on top as a button it reaches 5.07:1. If you need orange for text links, a deeper #B45309 reaches 4.56:1 on the same base.

Scheme 3, creative violet. Base #FAFAFC, text #17172F, primary #6D46D3 (rgb(109, 70, 211), hsl(256.6, 61.6%, 55.1%)), accent #EC4899. Text on the base is 16.78:1, the violet on the base is 5.81:1, and white on the violet is 6.05:1. The pink is trickier: white on #EC4899 is 3.52:1, enough for large text and interface parts but not for body copy. Dark #17172F on the pink is 4.96:1. If you want pink as text on the page, #BE185D reaches 5.79:1 on the base.

Scheme 4, dark mode. Base #12121A (rgb(18, 18, 26)), text #EDEDF5, primary #A78BFA, accent #FBBF24. Text on the base is 15.99:1, the lavender primary is 6.84:1, and the amber accent is 11.16:1. In dark schemes the primary usually moves lighter so it still reads against the dark background, and button text flips to the dark base: #12121A on #A78BFA is 6.84:1.

SchemeText on basePrimary on baseText on accent buttonWeak spot
SaaS blue17.06:16.40:18.31:1Amber alone on base is 2.05:1
Wellness green13.49:15.72:15.07:1Terracotta on base is 2.65:1
Creative violet16.78:15.81:14.96:1White on pink is 3.52:1
Dark mode15.99:16.84:111.16:1Needs a light-mode twin

A useful pattern appears in the table: the text and brand colors pass easily because they were built to, while the accent is where each scheme needs care. You can browse similar ready-made sets in the palette library, and the color converter translates any value between HEX, RGB and HSL when your design tool and your CSS speak different formats.

How do you test a scheme in a mockup?

A palette on a swatch card tells you little. Test it on a page:

  1. Apply the roles to a real layout. Use a header, a hero with a button, a row of cards, a form and a footer. Color rarely fails in the swatch; it fails in the form field border or the disabled button.
  2. Squint and grayscale. Blur the screen or convert it to grayscale. If the main button stops being the most noticeable shape, the accent is too close to the primary in lightness.
  3. Check every text and component pair. Body text, link text, button text, placeholder text, borders and focus rings each need their own check.
  4. Add the dark version. Browsers can follow the visitor's system preference through the color-scheme property and the prefers-color-scheme media query; the CSS light-dark() function offers a compact way to write both values [4].
  5. Do not rely on color alone. Pair status colors with text or icons.

Save your final values as named variables (for example --color-bg, --color-text, --color-primary, --color-accent) so a later change happens in one place.

Frequently Asked Questions

How many colors should a website color scheme have?

Most sites need four working colors: a background, a text color, a primary and one accent. Add a few tints and shades of the primary for hover states and borders, but keep the number of distinct hues low. Fewer hues makes the scheme easier to keep consistent as pages are added.

Is the 60-30-10 rule required?

No. It is a common rule of thumb borrowed from interior design, and nothing in web standards depends on it. Use it as a sanity check for hierarchy: if your accent covers a third of the screen, it has stopped being an accent.

Should the call-to-action button use the primary color or an accent?

Use the accent when you want the button to stand apart from links and headers, which is the usual case for a main action. If your brand color is already vivid and rare on the page, using it for the button can also work. In both cases, check the button label against the button fill, not against the page.

Can I use pure black text on a white background?

You can, and it passes easily at 21:1. Many designers soften it slightly, for example with a deep blue-black like #0F172A on a tinted off-white, which still gives 17.06:1 while feeling less harsh over long reading.

Our Take

We think most website color problems come from skipping the roles step. People pick a lovely palette on a swatch card and then discover that the button label is unreadable or the link color disappears on a tinted card. Our rule is to decide the neutral and the text first, make the brand color earn its place at 4.5:1 or better where it carries text, and treat the accent as a fill with dark text on top rather than as a text color. We also prefer a slightly tinted neutral over pure white; it costs nothing and makes a plain page look intentional. Treat the four schemes above as starting points: change the base hue, then recheck every pair in the contrast checker rather than trusting the numbers we printed for a different color.

Sources

  1. Understanding Success Criterion 1.4.3: Contrast (Minimum). W3C.
  2. Understanding Success Criterion 1.4.6: Contrast (Enhanced). W3C.
  3. Understanding Success Criterion 1.4.11: Non-text Contrast. W3C.
  4. color-scheme. MDN Web Docs.

Color values are shown in sRGB. Contrast results follow WCAG 2.x and do not cover every accessibility need. Spotted an error? Tell us.