From 54606f9c06662d7e05b7551e8db299aeb68c5f42 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Sat, 9 Jul 2022 05:30:10 -0400 Subject: [PATCH] color encoding fix --- src/ColorEncoder.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ColorEncoder.js b/src/ColorEncoder.js index 19e117c..3eaf785 100644 --- a/src/ColorEncoder.js +++ b/src/ColorEncoder.js @@ -67,10 +67,10 @@ function getTimeColor(currentDate = new Date()) { let h = Math.floor((dayOfYear / 365) * 100) / 10000; let s = (hours + 1) / (24 / 3); // let s = 1; - let l = 0.1 + Math.floor(((hours / 60)) * 1000) / 1000; - if (l > 1) l = 1; - // let l = 0.5; - l = l / 2; + let l = 0.25 + Math.floor(((hours / 60)) * 1000) / 1000; + + if (l > 0.5) l = 0.5; + if (s > 1) s = 1; console.log(h, s, l);