NinjaFunction (Ninja Function) logo

Color Palette Generator

Get a matching five-colour palette from one base colour, with six colour harmonies. Copy HEX codes or CSS variables.


Colour harmony

Colours that sit next to each other.

Your palette

Click a colour to copy its HEX code. Everything is worked out in your browser.

About This Tool

NinjaFunction's Color Palette Generator builds a five-colour palette from one base colour. Choose complementary, analogous, triadic, split complementary, tetradic or monochrome harmony, press Random colour for new ideas, click any colour to copy its HEX code, and copy the whole palette as a list or as CSS variables. It runs in your browser, so nothing is sent to a server.

🔑 How to Use

  1. Choose a base colour. Type a HEX code, click the colour box, or press Random colour.
  2. Pick a harmony. The palette changes straight away.
  3. Click any colour to copy its HEX code.
  4. Use Copy all HEX to copy the whole list, or Copy CSS variables to get ready-made code.
  5. Press Random colour again until a palette catches your eye.

💡 Pro Tips

  • ✔ Start from your brand colour and try each harmony to see which one fits.
  • ✔ Use one colour as the star and the others in small amounts.
  • ✔ Check text on every colour with the Color Contrast Checker.
  • ✔ Need lighter and darker versions of one colour? Use the Color Shades Generator.

Colour Harmonies Explained

HarmonyHow it is builtFeels
ComplementaryYour colour and the one opposite itBold, high contrast
AnalogousYour colour and its two neighboursCalm, natural
TriadicThree colours spaced evenlyLively, balanced
Split complementaryYour colour and the two beside its oppositeContrast with less tension
TetradicFour colours in two opposite pairsRich, needs care
MonochromeOne colour in five lightness levelsClean, elegant

How to Use Your Palette

  • Pick the largest colour for backgrounds, a second colour for panels and headings, and the accent for buttons and links.
  • Copy the CSS variables into your stylesheet and use them as var(--color-1) so you can change the whole look in one place.
  • Save the HEX codes in your design notes so every page and document uses the same colours.

Choosing a Palette for a Project

ProjectSuggested harmony
Calm website or blogAnalogous
Call-to-action buttons that must stand outComplementary
Playful brand with many coloursTriadic
Clean, professional lookMonochromatic shades with one accent

The 60-30-10 Rule

A simple way to balance colours is to use your main colour for about 60 percent of the design, a second colour for about 30 percent, and an accent colour for about 10 percent. The accent is best kept for buttons and links so they draw the eye.

Check Readability

  • Text and its background need enough contrast. Dark grey on white is safer than light grey on white.
  • Do not rely on colour alone, for example red and green, to show a meaning.
  • Test your final colours with a contrast checker before you publish.
  • Look at the design in dark mode too, if your site has one.

Frequently Asked Questions

How does the palette generator work?

It turns your base colour into hue, saturation and lightness, then moves the hue around the colour wheel by set amounts to find colours that go together. Each harmony uses different amounts, and the palette is filled up to five colours.

What is a complementary colour?

The complementary colour sits exactly opposite your colour on the colour wheel, for example blue and orange, or red and cyan. The pair has strong contrast and stands out.

What does analogous mean?

Analogous colours sit next to each other on the colour wheel, such as green, teal and blue. They feel calm and natural because they are so close.

Which harmony should I choose for a website?

Analogous and monochrome palettes are safe and calm, and are good for backgrounds and text. Complementary and triadic palettes are livelier and work well for buttons and highlights. Use one main colour, one supporting colour and one accent.

How many colours should a design use?

A common rule is 60 percent of one main colour, 30 percent of a second colour and 10 percent of an accent colour. Neutral colours such as white, grey and black come on top of that.

Is the palette readable for everyone?

The tool picks colours that go together, but it does not check whether text on them is easy to read. Test your text and background pairs with the Color Contrast Checker.

Are my colours sent to a server?

No. The palette is worked out in your browser, and nothing you enter is sent or stored.

Always FreeAll tools are 100% free to use.
No Sign UpNo registration or login required.
Blazing FastInstant results, always.