Skip to content

Color Palette Generator

Create color palettes and test color contrast with built‑in WCAG accessibility checks

Professional Color Tools for UI/UX Design

Generate beautiful color palettes and test color contrast ratios to ensure your designs are both visually appealing and accessible to everyone.

Color Palette Generator

Tip: Click on any color swatch to edit its hex value. Press Enter to apply changes.

Color Format Converter & Accessibility Tester

Sample Text for Contrast Testing
The quick brown fox jumps over the lazy dog.
This is regular body text for testing readability at smaller sizes.

HEX
#24172E
RGB
rgb(230, 234, 242)
HSL
hsl(220, 30%, 93%)
AAA ≥ 7.0 • AA ≥ 4.5 (normal text) • AA‑Large ≥ 3.0.

WCAG Accessibility Guidelines

AAA

Enhanced Contrast

Contrast ratio of 7:1 or higher for normal text

Required for level AAA compliance
AA

Minimum Contrast

Contrast ratio of 4.5:1 or higher for normal text

Required for level AA compliance
AA Large

Large Text

Contrast ratio of 3:1 or higher for large text

18pt+ or 14pt+ bold text

How to build a palette that works on a real site

  1. Generate until one colour feels right for your brand, then edit the other swatches around it.
  2. Assign roles, not just colours. A usable UI palette needs a primary (buttons, links), a secondary or accent, a neutral for text, a light background and a status colour or two (success, error).
  3. Follow the 60-30-10 rule: about 60% neutral background, 30% secondary surfaces, and 10% primary accent for the things you want clicked.
  4. Test text contrast in the Accessibility Tester before you commit. Body text needs at least 4.5:1 against its background.
  5. Copy all hex codes and save them as CSS variables or design tokens.

Turn your palette into CSS variables

Store the colours once and reuse them everywhere:

:root {
  --color-primary: #5b4bff;
  --color-accent:  #ff6ad5;
  --color-text:    #1d1b2e;
  --color-muted:   #6b6880;
  --color-bg:      #f8f7ff;
}
.button { background: var(--color-primary); color: #fff; }

Changing a brand colour later then means editing one line instead of searching every file.

Colour harmony basics

  • Monochromatic: shades of one hue. Calm and easy to keep accessible.
  • Analogous: neighbours on the colour wheel, such as blue, teal and green. Harmonious, good for backgrounds.
  • Complementary: opposites, such as blue and orange. High energy; use one as a small accent.
  • Split complementary: one base colour plus the two colours beside its opposite. Contrast with less tension. Try the split complementary tool.

Common palette mistakes

  • Picking colours without roles. Five pretty swatches do not tell you which one is for buttons or text.
  • Using a bright brand colour for body text. Saturated colours rarely pass 4.5:1 on white. Keep text dark and neutral.
  • Too many accent colours. If everything stands out, nothing does. One primary and one accent is usually enough.
  • Forgetting dark mode. Check each colour on a dark background too, or create a second set of variables for it.

Frequently asked questions

How many colours should a website palette have?

Usually five to seven: a primary, an accent, two or three neutrals for text and backgrounds, and status colours for success and errors.

What contrast ratio do I need for text?

WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text (about 24px, or 19px bold). The built-in tester shows the ratio for any pair.

Can I edit a colour in the generated palette?

Yes. Click a swatch, type a new hex value and press Enter.

What is the 60-30-10 colour rule?

A balance guide: about 60% of the design uses a dominant neutral, 30% a secondary colour, and 10% an accent for key actions.

Is this colour palette generator free?

Yes. It runs in your browser, needs no sign-up, and you can copy all hex codes at once.

Related colour tools and guides