lighten method

Color lighten([
  1. double amount = 0.1
])

Makes the color lighter.

The higher the value(0.0 - 1.0), the lighter the image becomes.

Implementation

Color lighten([double amount = 0.1]) {
  assert(amount >= 0 && amount <= 1);
  final hsl = HSLColor.fromColor(this);
  final hslLight =
      hsl.withLightness((hsl.lightness + amount).clamp(0.0, 1.0));
  return hslLight.toColor();
}