withWhite method

Color withWhite(
  1. int add
)

⬜ With White

Color.withWhite(int add)
// Brightens Color's RGB values by `add` (result <= 255)

Implementation

Color withWhite(int add) => Color.fromARGB(
      this.alpha,
      (this.red + add).clamp(0, 255),
      (this.green + add).clamp(0, 255),
      (this.blue + add).clamp(0, 255),
    );