
Free Online Color Palette Generator
Build a five-colour palette from any base colour using colour wheel harmonies, lock the colours you like, check readability and export CSS, SCSS or JSON.
A good palette makes a design feel calm and consistent, while a random handful of colours makes it feel messy. Designers lean on a few simple rules based on the colour wheel to pick colours that belong together. This generator applies those rules for you. Choose one base colour, pick a harmony, and get five colours with their codes, a readability check and ready-to-paste code. Everything runs in your browser.
The harmony rules
Colours on the wheel are arranged by hue, measured in degrees around a circle. Harmonies are patterns of angles from your base colour. The generator keeps the saturation and lightness of the base and moves the hue, with small lightness changes to give a usable range.
| Harmony | Hue pattern | Character |
|---|---|---|
| Analogous | Base, and two neighbours each side at 30 and 60 degrees | Calm and natural |
| Complementary | Base and its opposite at 180 degrees, plus light and dark versions | Strong contrast |
| Triadic | Three colours 120 degrees apart | Lively and balanced |
| Square | Four colours 90 degrees apart | Rich, needs careful use |
| Split complementary | Base plus the two colours either side of its opposite | Contrast with less tension |
| Monochrome | One hue at different lightness | Elegant and safe |
| Shades | One hue from very light to very dark | Useful for backgrounds and text |
How to use it
- Type a HEX code or use the picker to set the base colour.
- Choose a harmony. The five colours appear at once.
- Press Lock on any colour you want to keep, then press Shuffle unlocked colours to explore around it.
- Read the contrast of each colour with white and with dark text.
- Choose CSS variables, SCSS variables, JSON or a plain list and copy the export, or download the palette as a PNG strip.
A worked example
With the base #5A28C8 and the analogous harmony, the palette is #2896C8, #2846C8, #5A28C8, #AA28C8 and #C82896, running from a cool blue through the violet to a magenta. The readability table shows that white text has a contrast of 8.16 to 1 on the base colour, 7.50 on #2846C8, 5.46 on #AA28C8 and 5.00 on #C82896, all above the usual 4.5 to 1 target. The lightest of the five, #2896C8, reaches only 3.34 with white but 5.47 with dark text, so the tool recommends dark text there. Chosen as CSS variables, the first lines read --color-1: #2896C8; and --color-2: #2846C8; and so on.
Readability built in
Every colour is paired with the text colour that reads better on it, and the table lists the exact ratios. Under the WCAG 2 method, a ratio of 4.5 to 1 is the usual minimum for normal text and 3 to 1 for large text, with 7 to 1 for the stricter level. The results are labelled as AAA, AA, large text only or fail. A palette can look lovely and still be hard to read, so check combinations you plan to use together, such as a text colour over a background colour from the same set.
Giving colours jobs
Five colours are enough for most projects when each has a role. Pick one as the main brand colour, one or two as supporting colours, and keep the lightest and darkest for backgrounds and text. Use the strongest colour sparingly for buttons and links so that it stands out. A common habit is a rough split of 60 percent neutral background, 30 percent supporting colour and 10 percent accent, which keeps pages calm.
Surprise me
The Surprise me button chooses a random base colour and the shuffle button re-rolls the colours you have not locked. The random colours are chosen away from the warmest part of the wheel, with moderate saturation and lightness, which tends to give pleasing starting points. Locking a colour you like and shuffling the rest is a quick way to explore. A harmony you choose yourself can use any hue, including warm ones, because it follows your base colour.
Exporting
- CSS variables: paste inside a stylesheet and use var(–color-1) anywhere.
- SCSS variables: for projects that use Sass.
- JSON: for design tokens, scripts and apps.
- Plain list: for quick sharing in chat or documents.
- PNG: a 1500 by 500 strip with the codes written on each colour.
Limits
The palette is calculated in the HSL model, which is simple but does not match human vision perfectly, so colours of the same lightness can look unequal in brightness. The tool does not simulate colour blindness or check printing profiles. Treat the result as a first draft, test it on real screens and in dark mode, and never use colour alone to carry meaning. Your last palette is kept in your browser for convenience and is never sent anywhere.
Inspect any single colour with the colour converter, blend two of them with the CSS gradient generator, and use the result in your favicon. The guide to choosing brand colours and fonts explains how to decide on meaning, and the logo design and branding course shows palettes in real identities.
Key takeaways
- Harmonies are patterns of hue angles from one base colour.
- Lock colours you like and shuffle the rest to explore.
- Each colour comes with the better text colour and exact contrast ratios.
- Export CSS, SCSS, JSON, a list or a PNG strip.
- Test the palette on real screens before you commit.
Questions
What is a colour harmony?
A colour harmony is a rule for picking colours that look good together, based on their positions on the colour wheel. For example, analogous colours sit next to each other, complementary colours sit opposite each other, and triadic colours are spaced evenly in thirds. The generator applies these rules to your base colour.
How many colours should a palette have?
Five is enough for most projects. Use one main colour, one or two supporting colours, and a light and a dark neutral for backgrounds and text. More colours are harder to keep consistent, so add them only when a design truly needs them, and give each a clear job.
How do I know if text will be readable?
Check the contrast ratio. The table lists each colour with white and with dark text, labelled as AAA, AA, large text only or fail. A ratio of at least 4.5 to 1 suits normal text. If both options score poorly, adjust the lightness of that colour.
Can I keep one colour and change the others?
Yes. Press Lock on a colour to hold it, then use Shuffle unlocked colours to generate new options for the rest. This is a fast way to explore ideas around a colour you must use, such as a brand colour from a style guide.
How do I use the exported CSS variables?
Paste the block into your stylesheet, usually at the top. Then refer to the colours with var, for example color: var(--color-1) or background: var(--color-3). Renaming the variables to roles such as primary and accent makes a large project easier to understand and maintain.
