copyWith method
Implementation
@override
PColorRGB copyWith({int? r, int? g, int? b, double? alpha}) {
if (alpha == null || alpha == 1.0) {
return PColorRGB(r ?? this.r, g ?? this.g, b ?? this.b);
} else {
return PColorRGBA(r ?? this.r, g ?? this.g, b ?? this.b, alpha);
}
}