withAlpha method

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

Returns this HspColor modified with the provided alpha value.

Implementation

@override
HspColor withAlpha(int alpha) {
  assert(alpha >= 0 && alpha <= 255);
  return HspColor(hue, saturation, perceivedBrightness, alpha);
}