Sub topic 9
Analogous colours: neighbours on the wheel
This chapter assumes you can describe a colour by hue, saturation, and lightness (HSL), and that you have read the chapters on the colour wheel and on what makes a harmony. Hue is the position of a colour around the wheel, measured in degrees from 0 to 359.
The working model
An analogous harmony uses hues that sit next to each other on the wheel. You pick a base hue and add one or two neighbours on each side. A common spread is 30 degrees either side of the base, so a base of 210 gives 180, 210, and 240.
Because the hues are close, the palette feels unified. Neighbouring hues share undertones: blue-green, blue, and blue-violet all contain blue. This makes analogous schemes calm and cohesive, and they are common in nature, such as a sunset moving from yellow through orange to red.
The trade-off is low hue contrast. Nothing in the palette pulls the eye by hue alone, so you must create emphasis with lightness and saturation instead.
Building one in code
The offsets are small, so wrapping matters only near 0 and 360. A base hue of 10 with an offset of -30 gives -20, which must wrap to 340. The modulo step below handles this.
function analogous(baseHue, spread = 30, saturation = 65, lightness = 50) {
return [-spread, 0, spread].map((offset) => {
const hue = (((baseHue + offset) % 360) + 360) % 360;
return `hsl(${hue} ${saturation}% ${lightness}%)`;
});
}
console.log(analogous(210));
console.log(analogous(10));The first call prints hsl(180 65% 50%), hsl(210 65% 50%), and hsl(240 65% 50%). The second prints a first colour with hue 340, showing the wrap.
Making the palette usable
Using the same saturation and lightness for every hue gives a flat result. Vary them, and decide which colour dominates.
:root {
--base-hue: 210;
}
.page {
background: hsl(var(--base-hue) 30% 96%);
color: hsl(var(--base-hue) 40% 15%);
}
.panel {
background: hsl(calc(var(--base-hue) - 30) 45% 88%);
}
.button {
background: hsl(calc(var(--base-hue) + 30) 70% 35%);
color: white;
}Here the base hue dominates the page, the lower neighbour tints the panels, and the upper neighbour is the accent. The button uses a darker, more saturated value so it stands out without a new hue.
Common errors
- Spread too narrow. Hues within about 10 degrees look like one colour with a slight mistake. Use at least 20 to 30 degrees.
- Spread too wide. Beyond about 60 degrees on each side, the palette stops reading as a family.
- No lightness variation. Equal lightness makes text and shapes blend together. Check contrast, as covered in the accessibility chapter.
- No accent. If every colour has equal weight, nothing leads. Apply a proportion such as 60-30-10.
- Wheel mismatch. Neighbours on the RYB wheel and the RGB wheel differ in colour name, though the angle idea is the same. HSL code uses the RGB-based wheel.
Exercises
Exercise
Using the analogous function with the default spread, what are the three hues for a base hue of 350?
Show answer
320, 350, and 20. The upper value is 350 + 30 = 380, and the modulo step wraps it to 20.
Exercise
Why does an analogous palette need differences in lightness or saturation?
Show answer
The hues are close, so hue gives little contrast. Lightness and saturation create the emphasis and keep text readable.