withAlpha method

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

Returns this OklabColor modified with the provided alpha value.

Implementation

@override
OklabColor withAlpha(int alpha) {
  assert(alpha >= 0 && alpha <= 255);
  return OklabColor(lightness, a, b, alpha);
}