Rgba constructor

Rgba(
  1. int red,
  2. int green,
  3. int blue, [
  4. num? alpha,
])

Implementation

Rgba(int red, int green, int blue, [num? alpha])
    : r = Color._clamp(red, 0, 255),
      g = Color._clamp(green, 0, 255),
      b = Color._clamp(blue, 0, 255),
      a = (alpha != null) ? Color._clamp(alpha, 0, 1) : alpha;