From 44e647a5fe27c9379a276b8479873e8638e5d8b0 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 9 May 2022 20:59:32 -0300 Subject: expose rgb/hsl in getColors util This isn't actually used anywhere currently, it's just useful for the REPL. --- src/util/colors.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/colors.js b/src/util/colors.js index 3a7ce8f..f568557 100644 --- a/src/util/colors.js +++ b/src/util/colors.js @@ -17,5 +17,9 @@ export function getColors(primary) { const dim = `hsl(${Math.round(h)}deg, ${Math.round(s * 50)}%, ${Math.round(l * 80)}%)`; const bg = `hsla(${Math.round(h)}deg, ${Math.round(s * 15)}%, 12%, 0.80)`; - return {primary, dim, bg}; + return { + primary, dim, bg, + rgb: [r, g, b], + hsl: [h, s, l], + }; } -- cgit 1.3.0-6-gf8a5