copyWith method
Returns a copy of this color modified with the provided values.
Implementation
@override
OklabColor copyWith({
double? lightness,
double? a,
double? b,
int? alpha,
}) {
assert(lightness == null || (lightness >= 0 && lightness <= 1.0));
assert(a == null || (a >= 0 && a <= 1.0));
assert(b == null || (b >= 0 && b <= 1.0));
assert(alpha == null || (alpha >= 0 && alpha <= 255));
return OklabColor(
lightness ?? this.lightness,
a ?? this.a,
b ?? this.b,
alpha ?? this.alpha,
);
}