rgb: simpler style

This commit is contained in:
jean-emmanuel 2017-06-21 13:45:56 +02:00
parent 2a36b43e71
commit f1c6d42b27
2 changed files with 6 additions and 13 deletions

View file

@ -196,7 +196,7 @@ module.exports = class Rgb extends _pads_base {
if (!options.nohue && !options.dragged) {
var hue = hsbToRgb({h:this.hsb.h,s:100,b:100})
this.hue = `rgb(${Math.round(hue.r)},${Math.round(hue.g)},${Math.round(hue.b)})`
this.wrapper[0].setAttribute('style',`background:${this.hue}`)
this.wrapper[0].setAttribute('style',`background-color:${this.hue}`)
this.faders.h.setValue(this.hsb.h, {sync: false, send:false, dragged:false})
}