Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(instance, element) {
this.instance = instance
this.element = element
this.classes = this.instance.classes
this.opac = 100
this.color = null
this.COLOR = new Color()
this.mode = this.COLOR.toHEX()
this.HSL = this.COLOR.toHSL().toUpperCase()
this.HEX = this.COLOR.toHEX().toUpperCase()
this.RGB = this.COLOR.toRGB().toUpperCase()
this.classify = this.HEX
this.data = [
{ label: this.HEX, value: 'HEX' },
{ label: this.HSL, value: 'HSL' },
{ label: this.RGB, value: 'RGB' }
]
// this.bind()
this.init()
}
constructor(instance, element) {
this.instance = instance
this.element = element
this.classes = this.instance.classes
this.opac = 100
this.color = null
this.COLOR = new Color()
this.mode = this.COLOR.toHEX()
this.HSL = this.COLOR.toHSL().toUpperCase()
this.HEX = this.COLOR.toHEX().toUpperCase()
this.RGB = this.COLOR.toRGB().toUpperCase()
this.classify = this.HEX
this.data = [
{ label: this.HEX, value: 'HEX' },
{ label: this.HSL, value: 'HSL' },
{ label: this.RGB, value: 'RGB' }
]
this.init()
}
e => {
if (new Color().matchString(e.target.value)) {
this.set(e.target.value)
}
},
this.element
e => {
if (
new Color().matchString(e.target.value) ||
new Gradient().matchString(e.target.value)
) {
this.set(this.options.parse.call(this, e.target.value))
}
},
this.element