Sub topic 7
What makes a colour harmony
A colour harmony is a set of hues whose positions on the colour wheel follow a fixed geometric relationship. This chapter explains what that definition means in practice, why those relationships tend to look balanced, and where the idea stops being reliable. The next chapters cover complementary, analogous and triadic schemes one at a time. Here we build the shared working model they all rely on.
Prerequisites
This chapter assumes you can describe a colour by hue, saturation and lightness. It also assumes you can read a colour wheel, including the difference between primary, secondary and tertiary colours. If you need a refresher, review the earlier chapters on those topics first.
The working model: a harmony is a pattern of offsets
A harmony is defined by hue only. You choose one base hue, then pick other hues at fixed angular distances from it. The pattern is the harmony. The base hue is only the starting point.
Written as offsets from the base hue, the common harmonies look like this:
| Harmony | Offsets from base (degrees) | Number of hues |
|---|---|---|
| Complementary | 0, 180 | 2 |
| Analogous | -30, 0, +30 | 3 |
| Triadic | 0, 120, 240 | 3 |
Because the pattern is a set of offsets, you can rotate it anywhere on the wheel. A triadic scheme starting at blue (210°) has the same structure as one starting at red (0°). Only the starting point changes.
Saturation and lightness are not part of the harmony definition. The harmony tells you which hues to use. You still have to decide how vivid and how light each one is. This split between "which hues" and "how vivid or light" is the most useful idea in this chapter.
Why geometric relationships tend to work
Designers have used the wheel this way for a long time. The usual explanation has three parts.
- Order. Hues chosen by a rule look deliberate. A random set of hues looks accidental, even when each hue is attractive alone.
- Controlled contrast. Distance on the wheel acts as a rough measure of hue contrast. Neighbours (30° apart) contrast gently. Opposites (180°) contrast strongly. Choosing a harmony means choosing how much hue contrast you want.
- Limited variety. A rule keeps the number of distinct hues small. Fewer hues means the eye has less to reconcile.
None of this is a law of perception. It is a practical heuristic. Many good palettes break these rules, and many rule-following palettes look poor. Treat a harmony as a reliable starting point, then judge the result by eye.
The same offsets on different wheels
The offsets work on any wheel, but the colours they pick depend on which wheel you use. Traditional art-school wheels use the RYB model (red, yellow, blue as primaries). Screens and CSS use the RGB model, and HSL hue angles sit on an RGB-based wheel.
Take the offset 180°. On the HSL wheel, the complement of red (0°) is cyan (180°). On the traditional RYB wheel, the complement of red is green. Both are correct for their own wheel. They are different answers to the same question.
The practical rule: when you calculate harmonies in code, you are working on the HSL wheel. When you follow a printed wheel or an art textbook, you are probably working on RYB. Do not mix the two without checking the result.
Worked example: one pattern, two palettes
Start with a base hue of 210° (a medium blue). Apply the triadic offsets 0, 120 and 240. The hues are 210°, 330° and 90°.
Now compare two ways of finishing the palette.
- Version A: all three hues at 80% saturation and 50% lightness. The result is loud, with three equally strong colours competing for attention.
- Version B: the blue at 65% saturation and 45% lightness, the other two at 30% saturation and 85% lightness. The blue leads, and the other two support it.
Both versions are triadic, but only Version B is usable for most interfaces. The harmony alone did not decide that. The saturation and lightness choices did.
The code below builds both versions. It wraps each angle with a double modulo so that negative offsets and offsets larger than 360 still land between 0 and 359.
function wrapHue(angle) {
return ((angle % 360) + 360) % 360;
}
function palette(baseHue, offsets, styles) {
return offsets.map((offset, i) => {
const { s, l } = styles[i];
return `hsl(${wrapHue(baseHue + offset)} ${s}% ${l}%)`;
});
}
const triadicOffsets = [0, 120, 240];
const versionA = palette(210, triadicOffsets, [
{ s: 80, l: 50 },
{ s: 80, l: 50 },
{ s: 80, l: 50 },
]);
const versionB = palette(210, triadicOffsets, [
{ s: 65, l: 45 },
{ s: 30, l: 85 },
{ s: 30, l: 85 },
]);
console.log(versionA);
console.log(versionB);Running this prints two arrays of three hsl(...) strings. The hue numbers are the same in both arrays (210, 330, 90). Only the saturation and lightness numbers differ.
What a harmony does not guarantee
A harmony is necessary for a scheme to feel organised, but it is not sufficient. These are the common failures.
Equal weight
If every hue in a harmony covers the same area at the same intensity, the palette feels restless. Harmonies need a dominant colour. A later chapter covers dominance and the 60-30-10 guideline in detail.
Poor contrast
Hues at similar lightness can be hard to tell apart, even when their hues are 180° apart. Text on a background needs a lightness difference, and hue difference does not substitute for it. A complementary pair of red and cyan at equal lightness can vibrate and be hard to read.
Uneven perceived lightness
HSL lightness is a mathematical value, not a measure of what the eye sees. Yellow at hsl(60 100% 50%) looks much brighter than blue at hsl(240 100% 50%), although both have 50% lightness. A harmony built on identical HSL lightness values can therefore look unbalanced. Check the result visually, or use a perceptual colour space when precision matters.
Hue angle is not evenly spaced in appearance
On the HSL wheel, 30° of hue near green changes the look of a colour far less than 30° near orange. The geometry is even, but the perception is not. Offsets are a good first guess and are not a measurement of perceived difference.
Common errors
- Treating the base hue as special. Any hue can be the base. If your result looks wrong, try rotating the whole pattern.
- Forgetting to wrap angles. Without the modulo step,
10 - 30gives-20. In CSS,hsl(-20 ...)is accepted and wraps correctly, but other code, such as lookups or comparisons, may fail on it. Wrap explicitly. - Using the wrong wheel. A designer who picks "the opposite of red" from an art wheel gets green. Code that adds 180 to the hue gets cyan. Confirm which wheel the team expects.
- Fixing saturation and lightness globally. Using one value for every colour makes a flat, noisy palette. Vary them by role.
Summary of the model
- A harmony is a fixed set of hue offsets from a base hue.
- The offsets rotate to any base hue without changing the scheme.
- Saturation and lightness are separate choices, and they decide most of how the palette looks and whether it works.
- The result depends on the wheel. HSL and RYB give different complements.
- A harmony is a starting point. Proportion and contrast checks come next.
Exercise
You take a base hue of 20° and apply the analogous offsets -30, 0 and +30 in code, without wrapping. What hue values do you get, and what should the first one be after wrapping? Also, why might two palettes with the same analogous hues still look very different?
Show answer
Without wrapping you get -10, 20 and 50. After wrapping with ((angle % 360) + 360) % 360, the first value becomes 350. Two palettes with the same hues can look very different because a harmony only fixes hue. Saturation and lightness are separate choices, so one palette can be vivid and another muted, or one can have strong lightness contrast and the other very little.
Exercise
A teammate says the complement of red (0°) is green. Your code adds 180 to the hue and gets cyan. Who is right, and how do you resolve it?
Show answer
Both are right on their own wheel. The traditional RYB wheel puts green opposite red. The HSL wheel, which is based on RGB, puts cyan opposite red. To resolve it, agree which wheel the project uses. If the output is displayed on screens through CSS, the HSL result is what the code produces, so a designer who wants the RYB result must choose the green hue explicitly.