ssb: Color scheme is determined by day/hour/second. Couldn't help it.

This commit is contained in:
2024-12-29 13:55:48 -05:00
parent 1974ed1c03
commit 571cf5b5b8
2 changed files with 8 additions and 2 deletions

View File

@ -394,7 +394,13 @@ function is_dark(hex, value) {
}
function generated() {
let k_color = '#034f84';
let now = new Date();
let k_color = rgb_to_hex([
now.getDay() * 255 / 6,
now.getHours() * 255 / 23,
now.getSeconds() * 255 / 59,
]);
//let k_color = '#034f84';
//let k_color = rgb_to_hex([Math.random() * 256, Math.random() * 256, Math.random() * 256]);
let [r, g, b] = hex_to_rgb(k_color);
let [h, s, l] = rgb_to_hsl(r, g, b);