With hsl picking contrasting colours is easy. Contrast is useful because it helps to pick out one object from another. Text and background colours need to be different to read the text easily.
Assume you start with the orange from before. You can create contrast in three main ways:
- lightness - hsl(30,100%,20%) contrasts with hsl(30,100%,80%) but because they are the same colour they will work well together
- hue - hsl(30,100%,50%) contrasts with hsl(210,100%,50%) because the are on opposite sides of the colour wheel (180 degrees apart)
- saturation - hsl(30,100%,50%) contrasts with hsl(30,30%,50%) because of the difference in saturation but again they work well together