whiten method

Color whiten(
  1. double amount
)

Implementation

Color whiten(double amount) {
  assert(amount >= 0 && amount <= 1);
  double r = clampDouble(this.r * amount, 0.0, 1.0);
  double g = clampDouble(this.g * amount, 0.0, 1.0);
  double b = clampDouble(this.b * amount, 0.0, 1.0);
  return Color.from(red:r, green:g, blue:b, alpha: a);
}