withAlpha method

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

Returns this HslColor modified with the provided alpha value.

Implementation

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