complementary property

Color get complementary

Returns the complementary color (180° hue rotation).

Implementation

Color get complementary {
  final hsl = HSLColor.fromColor(this);
  return hsl.withHue((hsl.hue + 180) % 360).toColor();
}