Choosing colours is one of the hardest parts of design for non-designers. You might have one colour you like, perhaps from your logo, but what goes with it? Which colour should the buttons be? What about backgrounds, borders and highlights? Picking at random usually produces a clashing, amateur look.
Colour theory offers proven rules, called colour harmonies, for building palettes that work. The free Colour Palette Generator on RexBD applies those rules to any colour you choose and creates complementary, analogous, triadic, tetradic, split-complementary and monochrome palettes, ready to export as CSS variables or JSON. This guide explains how to use it and how to turn a palette into a real design.
Colour harmony basics
Colour harmonies are based on the colour wheel, which arranges hues in a circle: red, orange, yellow, green, blue, purple and back to red. Hue is measured in degrees around the wheel, from 0 to 360. Each harmony picks colours at particular angles.
| Harmony | How it is built | Feel | Good for |
|---|---|---|---|
| Monochrome | One hue in different lightness and saturation | Calm, cohesive | Minimal designs, dashboards |
| Analogous | Neighbouring hues, about 30ยฐ apart | Natural, harmonious | Backgrounds, nature and wellness brands |
| Complementary | Opposite hues, 180ยฐ apart | High contrast, energetic | Calls to action, sports, sales |
| Split-complementary | Base plus the two neighbours of its complement | Contrast with less tension | Versatile brand palettes |
| Triadic | Three hues 120ยฐ apart | Vibrant, balanced | Playful brands, education, children's products |
| Tetradic | Four hues forming a rectangle | Rich, complex | Experienced designers, illustrations |
How to use the Colour Palette Generator
Step 1: Choose a base colour
Open the Colour Palette Generator and enter a colour as a HEX code, or pick one. If you have a logo, use its main colour. You can extract colours from a logo or photo with the Image Color Picker or the Image Color Palette tool.
Step 2: Choose a harmony
Select complementary, analogous, triadic, tetradic, split-complementary or monochrome, and see the palette update.
Step 3: Compare options
Switch between harmonies to see which mood suits your project. A cafรฉ might suit warm analogous colours; a tech start-up might choose a cool blue with a complementary orange accent.
Step 4: Export
Export the palette as CSS variables or JSON, ready to drop into your project. The tool runs in your browser.
From palette to design: the 60-30-10 rule
A palette is not a list of colours to use equally. A classic guideline from interior design works well on screens too:
- 60% dominant colour, usually a neutral or light background.
- 30% secondary colour, for sections, cards and navigation.
- 10% accent colour, for buttons, links and highlights.
The accent should be the colour you most want people to notice, such as the "Buy now" or "Sign up" button. Using it sparingly makes it effective.
Assigning roles to colours
Real interfaces need colours for specific jobs. A practical palette usually includes:
| Role | Purpose |
|---|---|
| Primary | Main brand colour: buttons, links, key elements |
| Secondary | Supporting colour for variety |
| Accent | Highlights, badges, calls to action |
| Neutrals | Text, backgrounds, borders (greys, off-whites, near-blacks) |
| Success | Confirmations (usually green) |
| Warning | Cautions (usually amber) |
| Error | Errors (usually red) |
Harmony palettes give you the brand colours. Add neutrals and status colours that fit with them. For lighter and darker versions of each colour, such as hover states and subtle backgrounds, use the Shades & Tints Generator.
Using CSS variables
Exporting as CSS variables lets you define colours once and use them everywhere:
:root {
--color-primary: #2563eb;
--color-secondary: #7c3aed;
--color-accent: #f59e0b;
--color-text: #111827;
--color-bg: #f9fafb;
}
.button { background: var(--color-primary); color: #fff; }
If you later change the brand colour, you update one line and the whole site follows. Variables also make dark mode easier: redefine the same variables inside a dark-mode media query.
Accessibility: check contrast
Harmonious colours do not automatically mean readable text. Always check text and button combinations with the Contrast Checker. WCAG AA requires 4.5:1 for normal text. Bright accent colours such as yellow and light green usually need dark text, not white.
Also avoid relying only on colour to communicate. Red and green are hard to tell apart for many people with colour blindness. Preview your palette with the Colour Blindness Simulator.
A worked example: a palette for a tea brand
A small tea company in Sylhet has a logo in deep green (#166534). They want a website that feels natural and premium.
The owner enters the green and tries several harmonies:
- Analogous gives green, teal and yellow-green. It feels fresh and natural, ideal for backgrounds and illustrations.
- Complementary pairs green with a reddish-pink. It is striking, but a little too bold for a premium tea brand.
- Split-complementary gives green with a warm coral and a soft purple. The coral works beautifully as a small accent.
They choose a combination: deep green as the primary colour, a pale green-cream (#f0fdf4) as the dominant background, a muted teal as secondary, and coral (#f97360) as the 10% accent for "Shop now" buttons, darkened slightly until it passes contrast with white text. Exported as CSS variables, the palette now guides the website, packaging and social media graphics.
Building a full colour scale from each palette colour
Professional design systems rarely use just one version of each colour. They use a scale, from very light to very dark, often numbered from 50 to 900. For example, a blue scale might run from a near-white blue for backgrounds, through the main brand blue, to a deep navy for text on light backgrounds.
To build one:
- Take each main colour from your palette.
- Generate lighter tints and darker shades with the Shades & Tints Generator.
- Pick about nine evenly spaced steps.
- Name them consistently, such as
--blue-50to--blue-900. - Use light steps for backgrounds and hover states, middle steps for buttons and icons, and dark steps for text and borders.
With a full scale, you can design cards, alerts, badges and hover effects that all feel related, without inventing new colours each time.
Common palette mistakes
- Too many bright colours at once. Pick one accent to stand out and keep the rest calmer.
- Ignoring neutrals. Most of a good interface is white, off-white and grey. Neutrals let your brand colours shine.
- Pure black text. Very dark grey or a dark tint of your brand colour often looks more refined than #000000.
- Inconsistent use. If blue means "link" on one page and "warning" on another, users get confused. Assign roles and stick to them.
- Skipping contrast checks for buttons and text.
- Choosing colours on one screen only. Colours look different on phones, laptops and printed materials. Test on several devices.
Colour psychology: use with care
Colours carry associations, though they vary by culture and context:
- Blue: trust, calm, technology, finance.
- Green: nature, health, growth, money.
- Red: energy, urgency, passion. In Bangladesh, red also appears in celebrations and national symbolism.
- Orange: friendliness, enthusiasm, affordability.
- Yellow: optimism, attention, caution.
- Purple: creativity, luxury.
- Black: elegance, power, premium.
These are tendencies, not rules. Your brand's personality and audience matter more than generic associations.
Working with colour codes
The generator works with HEX codes, the most common format on the web. You may also need RGB, HSL or CMYK for print. Convert between formats with the Colour Converter. HSL (hue, saturation, lightness) is especially useful for building palettes, because changing only lightness creates tints and shades of the same hue.
Our colour palette tips and mistakes article covers dark mode palettes and brand consistency.
Frequently asked questions
What is the easiest harmony for beginners?
Monochrome and analogous palettes are the hardest to get wrong. Complementary palettes are powerful but need restraint.
How many colours should a website use?
Usually one primary, one or two supporting colours, an accent, a set of neutrals and a few status colours. Fewer colours used consistently look more professional.
Can I export the palette for my code?
Yes. Export as CSS variables or JSON.
Do palette colours pass accessibility automatically?
No. Check text and button combinations with the Contrast Checker.
Can I start from my logo colour?
Yes. Use your logo's main colour as the base. Extract it with the Image Color Picker if you do not know the code.
What is the difference between a tint and a shade?
A tint is a colour mixed with white, making it lighter. A shade is a colour mixed with black, making it darker. A tone is a colour mixed with grey. Palettes often use tints for backgrounds and shades for text and borders.
How do I choose colours for a dark theme?
Start from the same brand hues, but use lighter, slightly less saturated versions for text and accents, and very dark greys rather than pure black for backgrounds. Check every text pair with the Contrast Checker.
Is the Colour Palette Generator free?
Yes. It is free and runs in your browser.
Keep reading
How to Create CSS Gradients: Linear, Radial and Conic (With Examples)Colour & design ยท 7 min read
How to Check Colour Contrast for Accessibility (WCAG AA and AAA)Colour & design ยท 7 min read
Gold Weight Converter Guide: Bhori, Ana, Rati, Point and GramsUnit converters ยท 8 min read
How to Calculate the Days Between Two Dates (Exact Date Difference)Date & time ยท 7 min read
How to Convert Time Zones From Bangladesh (BST) to Anywhere in the WorldDate & time ยท 7 min read
How to Calculate Your BMI (With Asian and WHO Cut-offs Explained)Everyday & business ยท 7 min read
