copyWith method
Returns a copy of this color modified with the provided values.
Implementation
@override
XyzColor copyWith({
num? x,
num? y,
num? z,
int? alpha,
}) {
assert(x == null || x >= 0);
assert(y == null || y >= 0);
assert(z == null || z >= 0);
assert(alpha == null || (alpha >= 0 && alpha <= 255));
return XyzColor(
x ?? this.x,
y ?? this.y,
z ?? this.z,
alpha ?? this.alpha,
);
}