lighten method

Color lighten(
  1. double amount
)

Lightens this color by the given amount (0.0 to 1.0)

Implementation

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