Color Harmony
calculator.
Build a matching palette from any hex, RGB or HSL color, with text contrast.
- Base hue
- 218°
- Saturation
- 70%
- Lightness
- 52%
The two hues 30° either side of the opposite: from #2F6FDB that gives #DB452F (red) and #C5DB2F (yellow), all at the base's 70% saturation and 52% lightness. No pair reaches 4.5:1, so put text on white or black, not on another palette color; the best pair is 3.07:1.
On the color wheel
Drag the base handleColor wheel. The base hue is 218°; the palette hues are 218°, 8°, 68°. Drag the base handle round the wheel, or use the hue slider, and every color turns with it.
The colors
| Hex | RGB | HSL | Text on it |
|---|---|---|---|
| #2F6FDB (base)RGB rgb(47, 111, 219)HSL hsl(218, 70%, 52%) | rgb(47, 111, 219) | hsl(218, 70%, 52%) | White, 4.75:1 |
| #DB452FRGB rgb(219, 69, 47)HSL hsl(8, 70%, 52%) | rgb(219, 69, 47) | hsl(8, 70%, 52%) | Black, 4.90:1 |
| #C5DB2FRGB rgb(197, 219, 47)HSL hsl(68, 70%, 52%) | rgb(197, 219, 47) | hsl(68, 70%, 52%) | Black, 13.55:1 |
Which pairs can carry text
| Pair | Ratio | Level |
|---|---|---|
| #2F6FDB and #C5DB2F | 3.07:1WCAG 2.2 text level AA large | AA large |
| #DB452F and #C5DB2F | 2.76:1WCAG 2.2 text level Fails | Fails |
| #2F6FDB and #DB452F | 1.11:1WCAG 2.2 text level Fails | Fails |
WCAG 2.2 asks for 4.5:1 for body text (AA) and 7:1 for AAA; large text and interface parts need 3:1.
Tints, shades and tones
| Step | Tint | Shade | Tone |
|---|---|---|---|
| 1 | #5287E1Tone#3D72CC | #275DB7 | #3D72CC |
| 2 | #749FE7Tone#4A75BD | #1F4A92 | #4A75BD |
| 3 | #97B7EDTone#5878AE | #18386E | #5878AE |
| 4 | #BACFF3Tone#657A9E | #102549 | #657A9E |
| 5 | #DCE7F9Tone#737D8F | #081325 | #737D8F |
Each step mixes in one more sixth of white, black or mid gray (rgb 128) with #2F6FDB.
Palette card
3 colors with their codes, ready to drop into a brief or a slide. Print also gives a clean copy of the page.
How it's worked out
The tool turns your color into HSL: hue, saturation and lightness. Hue is an angle round the color wheel, where 0° is red, 120° is green and 240° is blue. Saturation runs from gray at 0% to full color at 100%. Lightness runs from black at 0% to white at 100%, with the pure color at 50%.
Each harmony adds fixed angles to the hue, then turns the result back into a color. Saturation and lightness stay the same, so the colors feel like one family.
| Harmony | Offsets |
|---|---|
| Complementary | 180° |
| Split complementary | 150°, 210° |
| Analogous | -30°, 30° |
| Triadic | 120°, 240° |
| Square (tetradic) | 90°, 180°, 270° |
| Rectangle (tetradic) | 60°, 180°, 240° |
Pure red shows the idea: its triadic partners are #00FF00 and #0000FF, the pure green and blue of a screen. The monochromatic scheme keeps the hue and steps the lightness instead.
For text, the tool uses the WCAG 2.2 contrast ratio. It compares how light two colors look on a screen and gives a figure from 1:1, the same color, up to 21:1 for black on white.
Worked examples
Nadia picks a second color for her bakery
Nadia's logo is the gold #E0A800, a hue of 45°. Its complement sits opposite, at 225°: #0038E0, a blue. Black text on the gold scores 9.77:1, so her menu can use it freely.
The two colors together reach 3.70:1, which WCAG rates "AA large". That is fine for a big heading in blue on gold, but under 4.5:1, so it is not enough for the small print on her price list.
Leo chooses series colors for a dashboard
Leo's product blue is #2F6FDB. The split complementary scheme adds #DB452F (red, 8°) and #C5DB2F (yellow, 68°). The three hues are far apart, so chart lines in these colors are easy to tell apart.
None of the pairs is good for text: the best is 3.07:1. So Leo puts labels in white or black on each color, keeps the palette for lines and bars, and uses a tint such as #97B7ED for a light panel.
Sam finds that gray does not turn
Sam's brand gray is #6B7280, at only 9% saturation. Its complement is #80796B, and the two score 1.12:1, close to identical. With so little color, turning the hue has almost nothing to turn.
The monochromatic scheme works better for Sam. It keeps the hue and gives six lightness steps from #23252A to #E3E5E8. Of the 15 pairs, 5 reach 4.5:1, so there are several safe choices for text on a background.
Reading your result
The swatches are a starting point. Harmony rules give hues that sit well together. Most real designs use one color for most of the space, a second for support and a third, sparingly, for buttons and links, with neutral grays around them.
Text needs contrast, not harmony. WCAG 2.2 asks for 4.5:1 for body text and 3:1 for large text, which it defines as 18 point, or 14 point bold. The enhanced level asks for 7:1. Buttons, form borders and chart parts also need 3:1 against what sits next to them.
Equal lightness does not look equal. HSL lightness is a simple average of the red, green and blue channels. CSS Color 4 warns that it does not match what the eye sees: yellow and blue at 50% look very different. Against black, #FFFF00 scores 19.56:1, while #0000FF needs white text, at 8.59:1.
Tints, shades and tones are lighter, darker and softer versions of the base. A tint mixes in white, which suits backgrounds. A shade mixes in black, which suits text and borders. A tone mixes in gray and calms a color that feels too strong.
Common mistakes
- Setting text in one palette color on another. Colors that look good side by side often fail as text and background. Check the pair table before you set a paragraph in them.
- Starting from a gray. A base under about 8% saturation barely changes when its hue turns. Pick the brand's strongest color as the base, or use the monochromatic scheme.
- Using color as the only signal. WCAG asks that color is not the only way to show meaning. Add a label, an icon or a pattern to chart series and to error states.
- Mixing up the two wheels. Screens mix red, green and blue light, and this tool uses that wheel. Paint wheels are built on red, yellow and blue, so a painter's complement can differ. Pure blue's complement here is #FFFF00.