aboutsummaryrefslogtreecommitdiffstats
path: root/bin/udt-accent
diff options
context:
space:
mode:
Diffstat (limited to 'bin/udt-accent')
-rwxr-xr-xbin/udt-accent16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/udt-accent b/bin/udt-accent
index 978f340..e88a512 100755
--- a/bin/udt-accent
+++ b/bin/udt-accent
@@ -19,12 +19,15 @@ import sys
import tempfile
from pathlib import Path
-# The nine candidate accents. rosewater and flamingo are excluded as
-# near-neutral tints that capture saturated inputs; maroon, sapphire and
-# lavender are excluded as near-duplicate hues of red, sky and mauve.
+# The candidate accents. rosewater and flamingo are excluded as near-neutral
+# tints that capture saturated inputs, and maroon and sapphire as near-duplicate
+# hues of red and sky. lavender sits close to mauve but is kept: it is the
+# desktop-wide fallback, used by Qt, GTK and anything else that needs one fixed
+# accent, so it has to be a value snap() can also return.
ACCENTS = {
- "pink": "#f5bde6",
- "mauve": "#c6a0f6",
+ "pink": "#f5bde6",
+ "mauve": "#c6a0f6",
+ "lavender": "#b7bdf8",
"red": "#ed8796",
"peach": "#f5a97f",
"yellow": "#eed49f",
@@ -34,7 +37,7 @@ ACCENTS = {
"blue": "#8aadf4",
}
-FALLBACK = "mauve"
+FALLBACK = "lavender"
MIN_CHROMA = 10.0
OUTPUT = Path.home() / ".cache" / "wal" / "udt-accent.rasi"
@@ -226,6 +229,7 @@ def selftest():
# A near-grey has an unstable hue angle and must take the fallback.
assert snap("#888888") == FALLBACK, snap("#888888")
+ assert FALLBACK in ACCENTS, FALLBACK
# Border neighbours must be distinct from the accent and from each other,
# or the gradient has nothing to animate between.