summaryrefslogtreecommitdiff
path: root/trongleposting-client/src/utils
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-11-29 15:31:23 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-11-29 15:31:23 -0700
commite5ca48b03bd8330dec958a89c3aea87a2fbadb07 (patch)
treefb84dfc88158aed2a851421238384f2ec6b99873 /trongleposting-client/src/utils
downloademacs-presentation-e5ca48b03bd8330dec958a89c3aea87a2fbadb07.tar.gz
emacs-presentation-e5ca48b03bd8330dec958a89c3aea87a2fbadb07.zip
working trongle and rought draft of emacs
Diffstat (limited to 'trongleposting-client/src/utils')
-rw-r--r--trongleposting-client/src/utils/generate_gruvbox.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/trongleposting-client/src/utils/generate_gruvbox.js b/trongleposting-client/src/utils/generate_gruvbox.js
new file mode 100644
index 0000000..7ff109b
--- /dev/null
+++ b/trongleposting-client/src/utils/generate_gruvbox.js
@@ -0,0 +1,14 @@
+const gruvboxColors = [
+ "#b8bb26",
+ "#fabd2f",
+ "#83a598",
+ "#d3869b",
+ "#8ec07c",
+ "#458588",
+ "#cc241d",
+ "#d65d0e",
+ "#bdae93",
+];
+
+export const generateGruvboxFromString = (string) =>
+ gruvboxColors[Array.from(string).map((x) => x.charCodeAt(0)).reduce((a, x) => a+x, 0) % gruvboxColors.length]; \ No newline at end of file