@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
23 lines • 436 B
JavaScript
/**
* Represents an RGBA color with mutable channels.
*/
export class RgbColor {
r;
g;
b;
a;
constructor(r, g, b, a = 1) {
this.r = r;
this.g = g;
this.b = b;
this.a = a;
}
update(key, value) {
this[key] = value;
return this;
}
toString() {
return `rgba(${this.r},${this.g},${this.b},${this.a})`;
}
}
//# sourceMappingURL=rgb-color.js.map