Color Palette Generator
Build a five-colour palette from one brand colour using colour harmony.
Inputs
ExampleHex, for example #2457C5.
Result
- Base#2457C5
- Base light#6498FF
- Base dark#00247C
- Complement#7C5A00
- Complement light#C69200
- Base
- #2457C5
- Base light
- #6498FF
- Base dark
- #00247C
- Complement
- #7C5A00
- Complement light
- #C69200
| Colour | Hex | OKLCH | Best text | Contrast |
|---|---|---|---|---|
| Base | #2457C5 | oklch(49.1% 0.181 262.8) | White | 6.47:1 |
| Base light | #6498FF | oklch(69.1% 0.162 262.7) | Black | 7.47:1 |
| Base dark | #00247C | oklch(31.1% 0.153 262.8) | White | 13.6:1 |
| Complement | #7C5A00 | oklch(49.0% 0.101 82.9) | White | 6.32:1 |
| Complement light | #C69200 | oklch(69.1% 0.142 83.1) | Black | 7.51:1 |
About this tool
Start from your brand colour and get a palette of five colours that work together. Harmonies are calculated in OKLCH, a colour space built around how people see, so colours with the same lightness look equally light, unlike plain HSL. Each swatch shows which text colour reads better on it.
- Enter your base colour as a hex code.
- Choose a harmony.
- Copy the hex codes or the CSS variables.
Formula
The base colour is converted to OKLCH (lightness, chroma, hue). Harmony colours rotate the hue (for example +180° for complementary, ±30° for analogous) and adjust lightness, keeping chroma. Colours outside the sRGB screen gamut have their chroma reduced until they fit.
Worked example
From #2457C5 (a mid blue), the complementary harmony adds an orange at the opposite hue, plus lighter and darker versions of both.
Assumptions and limits
- Palettes are a starting point; check text contrast with the WCAG Contrast Checker before use.
- Screen colours only; print colours need a proof. Use the Color Code Converter for approximate CMYK and Pantone matches.
- Very pale or very dark base colours give subtler harmonies, because there is little chroma to work with.
Questions
Which harmony should I choose?
Analogous and monochrome feel calm; complementary and triadic give stronger accents. Use one dominant colour and the rest sparingly.
Why OKLCH instead of HSL?
In HSL, yellow and blue at the same lightness look very different. OKLCH keeps perceived lightness even, so palettes look balanced.
Can I use these colours for text?
Check them first. The swatch labels show black or white text, whichever has more contrast.