lighten method

Color lighten(
  1. double amount
)

Lightens this color by amount (0..1) in HSL space.

Colors.blue.lighten(0.2)

Implementation

Color lighten(double amount) {
  final hsl = HSLColor.fromColor(this);
  return hsl
      .withLightness((hsl.lightness + amount).clamp(0.0, 1.0))
      .toColor();
}