Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var pmt = 1, pmtLS = 0, pmtLast = 0;
var lastinfo = {};
var isM = false, mw = 0, mh=0;
var ws, wsRpt=0;
var lastIntermediateColorUpdate = new Date();
var cfg = {
theme:{base:"dark", bg:{url:"", rnd: false, rndGrayscale: false, rndBlur: false}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}},
comp :{colors:{picker: true, rgb: false, quick: true, hex: false},
Expand Down Expand Up @@ -275,6 +276,7 @@ function onLoad()
handleLocationHash();
cpick.on("input:end", () => {setColor(1);});
cpick.on("color:change", () => {updatePSliders()});
cpick.on("color:change", () => {updateIntermediateColor()});
pmtLS = localStorage.getItem('wledPmt');

// Load initial data
Expand Down Expand Up @@ -2592,6 +2594,14 @@ function updatePSliders() {
gId('sliderK').value = cpick.color.kelvin;
}

function updateIntermediateColor() {
const now = new Date();
if (now - lastIntermediateColorUpdate > 500) {
lastIntermediateColorUpdate = now;
setColor(1);
}
}

function hexEnter()
{
if(event.keyCode == 13) fromHex();
Expand Down