brighten method

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

Implementation

Color brighten([double amount = 0.1]) {
  if (this == null) {
    return Colors.transparent;
  }
  final hsl = HSLColor.fromColor(this!);
  final lightness = (hsl.lightness + amount).clamp(0.0, 1.0);
  return hsl.withLightness(lightness).toColor();
}