display the currently selected color in color (#163)

This commit is contained in:
Rick van Hattem 2016-08-10 06:52:42 +02:00 committed by redPanther
parent 197af35de0
commit 0ef0530861

View File

@ -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';
},
/**