diff --git a/assets/webconfig/js/app/views/MainView.js b/assets/webconfig/js/app/views/MainView.js index 986af3fa..b4822292 100644 --- a/assets/webconfig/js/app/views/MainView.js +++ b/assets/webconfig/js/app/views/MainView.js @@ -353,7 +353,13 @@ define([ rgb.g = Math.round(rgb.g * this.brightness); rgb.b = Math.round(rgb.b * this.brightness); - this.inputbox.value = tools.b2hexstr(rgb.r) + tools.b2hexstr(rgb.g) + tools.b2hexstr(rgb.b); + this.inputbox.value = this.inputbox.style.backgroundColor = ( + '#' + + tools.b2hexstr(rgb.r) + + tools.b2hexstr(rgb.g) + + tools.b2hexstr(rgb.b) + ); + this.inputbox.style.color = (rgb.r + rgb.g + rgb.b) < 384 ? '#fff' : '#000'; }, /**