FormatterHQ

Color Palette Generator

Build a five-colour palette from one base colour with classic harmony rules, or press Space for random palettes. Lock the colours you like and export CSS, SCSS, Tailwind or JSON.

Loading tool…
Ready.

How to use the Color Palette Generator

  1. Pick or type a Base colour — HEX, rgb(), hsl() and CSS colour names all work.
  2. Choose a Harmony rule such as Complementary, Triadic or Analogous.
  3. Click Lock on colours you want to keep, then press Space or Random palette to regenerate the rest.
  4. Click any colour to copy its HEX value, or copy the whole palette from the CSS, SCSS, Tailwind or JSON tab.

A color palette generator built on colour harmony

Choosing colours that work together is easier when you start from rules designers have used for centuries. This color palette generator takes one base colour — usually your brand or accent colour — and places related hues around the colour wheel. You get five colours, a small interface mock-up showing them in use, and ready-to-paste code.

Harmony rules explained

  • Complementary: the base plus the hue directly opposite (180°). Maximum contrast; use one as the main colour and the other sparingly for calls to action.
  • Split complementary: the base plus the two hues next to its complement (150° and 210°). Strong contrast with less tension.
  • Analogous: neighbours 30° either side. Calm, cohesive palettes that are common in nature.
  • Triadic: three hues 120° apart. Balanced and colourful; let one dominate.
  • Tetradic and square: four hues (60°/180°/240° or every 90°). Rich palettes that need careful balancing.
  • Monochromatic: one hue at five lightness levels. Safe, elegant and easy to keep accessible.

When a rule yields fewer than five colours, the generator fills the remaining slots with lighter and darker variants of the harmony colours so you always have tints for backgrounds and shades for text.

Why hues are rotated in OKLCH

A classic HSL colour wheel is not perceptually even: rotating a vivid blue by 180° in HSL can give a yellow that looks far brighter. The generator rotates hues in OKLCH, a modern colour space where lightness and chroma stay visually consistent, so the resulting palette feels balanced. For example, the triadic scheme for #0f766e keeps a similar perceived lightness for all three hues.

Random palettes with locking

Press Space (or the button) to generate a random palette. Hues are spaced by the golden angle (about 137.5°) with controlled lightness and chroma, which avoids muddy combinations. Lock the colours you want to keep and regenerate the others until the set feels right.

Export formats

:root {
  --palette-1: #377552;
  --palette-2: #0f766e;
  --palette-3: #137286;
}

The CSS tab produces custom properties, SCSS gives $variables, the Tailwind tab outputs a v4 @theme block and JSON suits design tokens or scripts.

From palette to interface

A palette is only the start. Check every text/background pair with the contrast checker, build 50–950 scales for each colour with the tints and shades generator, and look at how the palette appears to people with colour-vision deficiencies in the colour blindness simulator. A good rule of thumb is 60-30-10: 60% neutral background, 30% secondary colour, 10% accent.

Common palette mistakes

The most frequent problem is using several saturated colours at equal strength, which makes a page feel noisy and hides the one button that matters. Let one colour lead and push the others back by reducing their saturation or using them as tints. A second pitfall is picking colours only by hue: two colours with very different hues but identical lightness can still look alike in greyscale and to people with colour-vision deficiencies. Finally, remember neutrals. Almost every interface needs a range of greys for text, borders and surfaces; tinting those greys slightly toward your primary hue makes the whole palette feel related.

Privacy

The tool runs entirely in your browser. Nothing you type or paste is sent to our servers.

Frequently asked questions

How many colors should a website palette have?
Most interfaces work well with one primary colour, one or two accents and a neutral grey scale. Five swatches are a practical starting point; you then derive lighter and darker steps from each.
What is the difference between complementary and split complementary?
Complementary uses the colour directly opposite on the wheel. Split complementary uses the two colours next to that opposite, which keeps contrast but is easier to balance.
Can I start from my brand color?
Yes. Enter the brand colour as the base; it is always kept unchanged in the palette while the other colours are derived from it.
Why do my colors look different from other palette tools?
Many tools rotate hue in HSL. This generator uses OKLCH by default, which keeps perceived lightness more even, so the same rule can produce slightly different, usually better balanced, colours.
Are the palettes free to use?
Yes. Colours cannot be owned, and the generated codes are yours to use in any project.

Last updated September 26, 2026

Related tools

Tints and Shades Generator Generate tints, shades and tones of any colour plus a 50–950 scale, and export CSS variables, SCSS or a Tailwind theme. Random Color Generator Generate random colours as HEX, RGB or HSL codes with a swatch preview for inspiration and testing. Color Blindness Simulator See how images and colour palettes look with protanopia, deuteranopia, tritanopia and other colour-vision deficiencies. Color Contrast Checker (WCAG) Check the WCAG 2 contrast ratio of text and background colours for AA and AAA, preview it live and get the closest passing colour. Color Converter Convert any colour to HEX, RGB, RGBA, HSL, HSV and CMYK at once. Accepts CSS names and any notation. Color Mixer Mix two colours at any ratio and generate blend steps in OKLab, RGB, Lab, LCH or HSL, with CSS color-mix() output. Colortone to CMYK Converter Convert a named colour tone (e.g. steelblue, tomato) or any colour to CMYK, with its tints, shades and tones. Colortone to HEX Converter Convert a named colour tone (e.g. steelblue, tomato) or any colour to HEX, with its tints, shades and tones. Colortone to HSV Converter Convert a named colour tone (e.g. steelblue, tomato) or any colour to HSV, with its tints, shades and tones. Colortone to RGB Converter Convert a named colour tone (e.g. steelblue, tomato) or any colour to RGB, with its tints, shades and tones. HEX to CMYK Converter Convert HEX colour values to CMYK instantly, with a live colour swatch preview, colour picker and copy buttons. HEX to Colortone Converter Generate the tints, shades and tones of a HEX colour as a palette with swatches and ready-to-copy codes.