diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-05-09 20:59:32 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-05-09 20:59:32 -0300 |
commit | 44e647a5fe27c9379a276b8479873e8638e5d8b0 (patch) | |
tree | efad14027f040ecaf5bdfc96e02d2f5f4ee138c1 /src | |
parent | 1a760926f783f4111e380e2d136ddb98cb4ee6a5 (diff) |
expose rgb/hsl in getColors util
This isn't actually used anywhere currently, it's just useful for the REPL.
Diffstat (limited to 'src')
-rw-r--r-- | src/util/colors.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/colors.js b/src/util/colors.js index 3a7ce8f3..f568557a 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], + }; } |