summaryrefslogtreecommitdiffstats
path: root/src/Color.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Color.js')
-rw-r--r--src/Color.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Color.js b/src/Color.js
index 1e2befb..de65750 100644
--- a/src/Color.js
+++ b/src/Color.js
@@ -29,10 +29,15 @@ SVG.hsl()
SVG.lab('rgb(100, 100, 100)')
*/
-import {isHex, isRgb, whitespace, rgb} from './regex.js'
+import {isHex, isRgb, whitespace, rgb, hex} from './regex.js'
+import {fullHex, compToHex} from './helpers.js'
export default class Color {
- constructor (color, g, b) {
+ constructor (...args) {
+ this.init(...args)
+ }
+
+ init (color, g, b) {
let match
// initialize defaults