saturate method

Color saturate([
  1. int amount = 10
])

Implementation

Color saturate([int amount = 10]) {
  final p = RangeError.checkValueInInterval(amount, 0, 100, 'amount') / 100;
  final hsl = HSLColor.fromColor(this);
  final saturation = _clamp(hsl.saturation + p);

  return hsl.withSaturation(saturation).toColor();
}