Skip to content

Color palette generator

Pick a base color and get a five-color palette from classic color harmony rules, with HEX, RGB and HSL codes, WCAG contrast against white and black text, and CSS export.

  • Free, no limits
  • No sign-up
  • No watermark
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Pick a base color or type a HEX code.
  2. Choose a harmony: complementary, analogous, triadic and more.
  3. Check each color's contrast with white and black text.
  4. Copy the HEX codes or CSS variables, or download JSON.
Try it now

Color harmonies

Every palette is built on the color wheel (hue, in HSL terms) from your base color:

HarmonyHow it's builtMood
ComplementaryBase + the opposite hue (180°), with lighter and darker tintsHigh contrast, energetic
AnalogousNeighboring hues on the wheelCalm, natural
TriadicThree hues evenly spaced (120° apart)Vibrant, balanced
Split complementaryBase + the two hues next to its complementContrast with less tension
TetradicFour hues evenly spaced (a square on the wheel), plus a light tint of the baseRich, needs one dominant color
MonochromaticOne hue in lighter and darker shadesClean, cohesive

Each palette has five colors, with your base color labeled. Click Random base color for inspiration, or adjust the base with the color picker until the palette fits.

A worked example

Start from a forest green, #0B7A55, and pick Complementary. You get the base green, a lighter and a darker version of it, a deep raspberry red from the opposite side of the wheel, and a softer tint of that red. A typical way to use it on a website:

  • the dark green for headers and text links,
  • the base green for primary buttons, with white text (the contrast check tells you whether white or black reads better),
  • the light green tint for section backgrounds,
  • the red only for a sale badge or an important call to action.

Switch the same base to Analogous for a calm range from green to teal, or to Monochromatic for a single-hue look with five lightness steps.

Codes for every color

Each swatch shows its HEX code (with a copy button), its RGB values and its HSL values (hue in degrees, saturation and lightness in percent). Use whichever your tool expects: HEX and RGB for CSS, Figma and most design apps; HSL when you want to make a color lighter or darker by changing one number.

At the bottom you can copy all HEX codes as a list, copy the palette as CSS custom properties ready to paste into a stylesheet, or download it as JSON with the base color and harmony, which is handy for design tokens.

Contrast and accessibility

Under each color the tool shows its contrast ratio with white text and with black text, as defined by WCAG 2, the Web Content Accessibility Guidelines, and the label the ratio earns:

Contrast ratioWCAG 2 level
7:1 or moreAAA for normal text
4.5:1 or moreAA for normal text
3:1 or moreAA for large text only (about 18 pt, or 14 pt bold)
below 3:1Fails for text

The text on each swatch automatically uses whichever of black or white reads better. Use colors that pass AA for body text and buttons; lighter, low-contrast colors work well for backgrounds, borders and illustrations.

Tips for using a palette

  • Follow the 60-30-10 rule of thumb: one dominant color for most of the space, a secondary color, and an accent for buttons and highlights.
  • Pair a saturated brand color with neutral grays or near-whites rather than using all five colors at full strength.
  • Harmony rules are a starting point; the calculated shades are worth fine-tuning by eye, especially very dark or very light ones.
  • Check your final combinations on real screens, in both light and dark mode.

Everything runs in your browser.

Frequently asked questions

What is a complementary color?

The color opposite on the color wheel, 180° away in hue. Blue and orange, or green and magenta, are complementary pairs.

What contrast ratio do I need for text?

WCAG 2 level AA requires at least 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 for normal text.

How do I use the palette in CSS?

Click Copy CSS variables and paste them into your stylesheet's :root rule, then use them like var(--color-1).

What is the difference between HEX, RGB and HSL?

They describe the same color differently: HEX and RGB give red, green and blue amounts, HSL gives hue, saturation and lightness.

Can I start from my brand color?

Yes. Type its HEX code into the HEX code field and pick a harmony.

Last updated: November 12, 2026

Recommended

Similar tools

If Color palette generator helped, you may need these too.

See all in category →

People also use