From 571cf5b5b85e813fad499350ddb748af34e6ee02 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 29 Dec 2024 13:55:48 -0500 Subject: [PATCH] ssb: Color scheme is determined by day/hour/second. Couldn't help it. --- apps/ssb.json | 2 +- apps/ssb/tf-styles.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 71647712..dfee3948 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&VAZXXBIeJH6zCSc6o4Za+RetRRZe41VKow+fBrYAIkc=.sha256" + "previous": "&Zm3zI6Q6mbGPnUNj1O07Fc5c71M7pME6AHk/a+pDIoA=.sha256" } diff --git a/apps/ssb/tf-styles.js b/apps/ssb/tf-styles.js index a71d960e..4b3a3e18 100644 --- a/apps/ssb/tf-styles.js +++ b/apps/ssb/tf-styles.js @@ -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);