aboutsummaryrefslogtreecommitdiff
path: root/.local/share/mode/lib
diff options
context:
space:
mode:
Diffstat (limited to '.local/share/mode/lib')
-rw-r--r--.local/share/mode/lib/accent.sh10
-rw-r--r--.local/share/mode/lib/functions.sh4
2 files changed, 14 insertions, 0 deletions
diff --git a/.local/share/mode/lib/accent.sh b/.local/share/mode/lib/accent.sh
new file mode 100644
index 0000000..45643eb
--- /dev/null
+++ b/.local/share/mode/lib/accent.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+[ "$mode" == "light" ] && {
+ export accent="$color15"
+ export accent_text="$color0"
+}
+[ "$mode" == "dark" ] && {
+ export accent="$(mix_rgb $bg $color0 0.5)"
+ export accent_text="$fg"
+}
+
diff --git a/.local/share/mode/lib/functions.sh b/.local/share/mode/lib/functions.sh
new file mode 100644
index 0000000..c7212e4
--- /dev/null
+++ b/.local/share/mode/lib/functions.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+hex_to_rgb_array() { pastel format rgb "$1" | cut -c4- | tr '()' '[]' ; }
+mix_rgb() { pastel mix --colorspace=RGB --fraction="$3" "$1" "$2" | pastel format hex ; }
+