Website color schemes

A website palette needs a background, a text color, a brand color, a muted gray and an accent, such as #F8FAFC, #0F172A, #1F5BFF, #64748B and #22C55E.

#0F172A
#1F5BFF
Slate gray#64748B
Ghost white#F8FAFC
Emerald green#22C55E
Adjust

or press the space bar

Gradient · OKLCH (smoother)
Variations
Contrast

Text color (row) on background (column): WCAG contrast ratio

Free·No sign-up·Works offline after the first visit

Website palettes

roleexamplerule
background#F8FAFCvery light (or very dark for dark mode)
text#0F172Aat least 4.5:1 on the background
brand / primary#1F5BFFbuttons and links; at least 3:1 on the background
muted#64748Bsecondary text, borders, icons
accent#22C55Esuccess, highlights, small areas only
  • Use the 60-30-10 rule: background 60%, surfaces and text 30%, brand and accent 10%.
  • Check every text color with the contrast checker before you build.
  • For dark mode, don't invert: use dark grays (#0D1117, #161B22) and slightly softer text (#C9D1D9).
  • Export to CSS variables or a Tailwind config with one click.

Printables

What makes a good website palette

A website palette is not just five pretty colors: each color has a job. You need a background, a text color with strong contrast against it, a brand color for buttons and links, a muted gray for secondary text and borders, and an accent for success messages or highlights. Most good UI palettes are mostly neutral, so the one brand color can guide the eye to the actions that matter.

The best color palettes for websites also stay readable for everyone. Body text should reach at least 4.5:1 against its background, buttons and form borders 3:1. Don't use color alone to show errors or success; add an icon or a label.

From palette to UI

Start with the brand color, then build steps of it from very light (for tinted backgrounds) to very dark (for hover states and text on light tints). The Shades button of each column in the generator gives ten steps at once. Choose neutrals that lean slightly toward the brand hue, a cool slate for a blue brand or a warm gray for a red one, so the page feels like one piece. Then export the palette as CSS variables or a Tailwind config and use the names in your code, not the raw hex values.

Questions and answers

What are the best color palettes for websites?

Palettes with a clear role for each color: light background, dark text, one brand color, a muted gray and one accent, such as #F8FAFC, #0F172A, #1F5BFF, #64748B and #22C55E.

How many colors should a website use?

Usually one brand color, one accent and three or four neutrals, plus shades of the brand color.

How do I make a UI color palette?

Pick a brand color, add neutrals for background and text, check contrast, and build lighter and darker steps for states.

What colors work for dark mode?

Dark grays instead of pure black, such as #0D1117 and #161B22, light gray text such as #C9D1D9, and a lighter version of the brand color.