Add .toString() method for Color objects

This commit is contained in:
Wliu
2017-11-12 01:20:23 +01:00
parent acb2bb2228
commit ebed2d7db0

View File

@@ -88,6 +88,10 @@ export default class Color {
toJSON () {
return this.alpha === 1 ? this.toHexString() : this.toRGBAString()
}
toString () {
return this.toRGBAString()
}
isEqual (color) {
if (this === color) {