mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
RGB background, color and value set
Same BG and color as hex elem, but value is set the hex BG value with whitespace removed
This commit is contained in:
@@ -164,8 +164,9 @@ _farbtastic = function (container, callback) {
|
||||
// Linked elements or callback
|
||||
if (typeof fb.callback == 'object') {
|
||||
// Set background/foreground color
|
||||
document.getElementById(fb.callback.id).style.backgroundColor = fb.color;
|
||||
document.getElementById(fb.callback.id).style.color = fb.hsl[2] > 0.5 ? '#000' : '#fff';
|
||||
document.getElementById(fb.callback.id).style.backgroundColor = document.getElementById(fb.callback.id + 'RGB').style.backgroundColor = fb.color;
|
||||
document.getElementById(fb.callback.id).style.color = document.getElementById(fb.callback.id + 'RGB').style.color = fb.hsl[2] > 0.5 ? '#000' : '#fff';
|
||||
document.getElementById('colorRGB').value = document.getElementById(fb.callback.id).style.backgroundColor.replace(/\s/g,'');
|
||||
|
||||
// Change linked value
|
||||
if (callback.value && callback.value != fb.color) {
|
||||
|
||||
Reference in New Issue
Block a user