code: function complement(color) {
    let rgb = parseColor(color);
    let hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
    hsl[0] = (hsl[0] + .5) % 1;
    hsl[2] = 1 - hsl[2];
    return hslToRgb(...hsl);
  }
docs: Compute the complement of a given colour.
  It converts the input colour to HSL and then
  shifts the hue by 180°. Doesn't give the same
  complement colour as using the colour wheel,
  but still a good enough complement colour.