withAlpha method

  1. @override
RgbColor withAlpha(
  1. int alpha
)

Returns this RgbColor modified with the provided alpha value.

Implementation

@override
RgbColor withAlpha(int alpha) {
  assert(alpha >= 0 && alpha <= 255);
  return RgbColor(red, green, blue, alpha);
}