(color, ignoreUpdateText)
| 250 | } |
| 251 | |
| 252 | setActiveColor(color, ignoreUpdateText) { |
| 253 | try { |
| 254 | this.input.style.color = reversedColor(color); |
| 255 | } catch (e) { |
| 256 | return; |
| 257 | } |
| 258 | this.input.style['background-color'] = color; |
| 259 | if (ignoreUpdateText === undefined) { |
| 260 | this.input.value = color; |
| 261 | } |
| 262 | this.color = color; |
| 263 | this.alphaColor = HexToRGBA(color, this.alpha); |
| 264 | if (this.callback !== undefined && this.opened) { |
| 265 | this.callback({ |
| 266 | alphaColor: this.alphaColor, |
| 267 | lightPosition: this.lightPosition, |
| 268 | alpha: this.alpha, |
| 269 | palleteColor: this.color, |
| 270 | target: this.target, |
| 271 | }); |
| 272 | } |
| 273 | if (this.addCallback !== undefined && this.opened) { |
| 274 | this.addCallback({ |
| 275 | alphaColor: this.alphaColor, |
| 276 | lightPosition: this.lightPosition, |
| 277 | alpha: this.alpha, |
| 278 | palleteColor: this.color, |
| 279 | target: this.target, |
| 280 | }); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | static html() { |
| 285 | return '' + |
no test coverage detected