set method
Sets all components at once.
Values are converted using num.toInt, truncating any fractional part.
Returns this instance for fluent chaining.
Implementation
X set(num r, num g, num b, num a) {
this.r = r.toInt();
this.g = g.toInt();
this.b = b.toInt();
this.a = a.toInt();
return this as X;
}