toComplementary method
Implementation
Color toComplementary() {
final HSLColor color = toHSL();
double hue = color.hue + 180;
if (hue > 360) hue -= 360;
return HSLColor.fromAHSL(
color.alpha,
hue,
color.saturation,
color.lightness,
).toColor();
}