Color withRed(int r)

Returns a new color that matches this color with the red channel replaced with r.

Source

Color withRed(int r) {
  return new Color.fromARGB(alpha, r, green, blue);
}