From e5ca48b03bd8330dec958a89c3aea87a2fbadb07 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Wed, 29 Nov 2023 15:31:23 -0700 Subject: working trongle and rought draft of emacs --- trongleposting-client/src/utils/generate_gruvbox.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 trongleposting-client/src/utils/generate_gruvbox.js (limited to 'trongleposting-client/src/utils/generate_gruvbox.js') 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 -- cgit v1.3