saturate method

Color saturate(
  1. double amount
)

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

Implementation

Color saturate(double amount) {
  final hsl = HSLColor.fromColor(this);
  final saturation = (hsl.saturation + amount).clamp(0.0, 1.0);
  return hsl.withSaturation(saturation).toColor();
}