color encoding fix

This commit is contained in:
Hri7566 2022-07-09 05:30:10 -04:00
parent dbfe4792a8
commit 54606f9c06
1 changed files with 4 additions and 4 deletions

View File

@ -67,10 +67,10 @@ function getTimeColor(currentDate = new Date()) {
let h = Math.floor((dayOfYear / 365) * 100) / 10000; let h = Math.floor((dayOfYear / 365) * 100) / 10000;
let s = (hours + 1) / (24 / 3); let s = (hours + 1) / (24 / 3);
// let s = 1; // let s = 1;
let l = 0.1 + Math.floor(((hours / 60)) * 1000) / 1000; let l = 0.25 + Math.floor(((hours / 60)) * 1000) / 1000;
if (l > 1) l = 1;
// let l = 0.5; if (l > 0.5) l = 0.5;
l = l / 2; if (s > 1) s = 1;
console.log(h, s, l); console.log(h, s, l);