darken method

Color darken(
  1. double amount
)

Implementation

Color darken(double amount) {
  final hsl = HSLColor.fromColor(this);
  final changed = hsl.withLightness(hsl.lightness * (1 - amount));
  return changed.toColor();
}