most importantly, we can use variations in lightness to guarantee visual contrast between one colour and another, regardless of their hue.
Smith, Alan. How Charts Work (p. 256). Pearson Education. Kindle Edition.
related: HSL - Hue Saturation Lightness, Multi-hue colour schemes with insufficient lightness contrast are unreadable by colourblind readers