From 154bb069476e9e3a438b76774a739e980b49494e Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 27 Sep 2026 18:23:03 +0200 Subject: feat(palette): add a translucent scrim role for fullscreen overlays The power menu's ground was a hardcoded rgba(36, 39, 58, 0.88), Macchiato's base, so every other scheme drew its overlay with a Macchiato tint. Each roles file now defines scrim as its own background at 88% alpha, udt-palette emits it into palette.rasi, and powermenu.rasi uses @scrim. scrim is the first translucent palette entry, so udt-accent's QML palette no longer drops the alpha pair: an opaque colour still goes out as #rrggbb, a translucent one as QML's #aarrggbb. Co-Authored-By: Claude Opus 5.5 --- bin/udt-accent | 9 +++++---- bin/udt-palette | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/udt-accent b/bin/udt-accent index e366bb1..72d3a64 100755 --- a/bin/udt-accent +++ b/bin/udt-accent @@ -242,9 +242,9 @@ def write_hyprlock_border(name): def read_palette(): """Parse palette.rasi into {name: "#rrggbb"}. - rofi writes colours as #rrggbbaa; QML wants #rrggbb, and every entry in - that file is fully opaque, so the alpha pair is dropped rather than - converted. Returns an empty dict if the file is missing, which leaves the + rofi writes colours as #rrggbbaa; QML wants #rrggbb, or #aarrggbb when + translucent. Only scrim is, so an opaque alpha pair is dropped and any + other is moved to the front. Returns an empty dict if the file is missing, which leaves the QML palette to fall back to its own defaults. """ try: @@ -254,7 +254,8 @@ def read_palette(): found = {} for key, value in re.findall(r"(\w+):\s*#([0-9a-fA-F]{6,8})\s*;", text): - found[key] = "#" + value[:6] + alpha = value[6:].lower() + found[key] = "#" + (alpha if alpha not in ("", "ff") else "") + value[:6] return found diff --git a/bin/udt-palette b/bin/udt-palette index f603899..234d97a 100755 --- a/bin/udt-palette +++ b/bin/udt-palette @@ -151,6 +151,8 @@ ROFI_NAMES = [ # the active border, which is magenta under candy-night; termblue is the # terminal's blue, a real blue in every scheme but Dracula, which has none. ("peach", "peach"), ("mauve", "highlight"), ("termblue", "blue"), + # The one translucent entry: the fullscreen overlays' ground. + ("scrim", "scrim"), ] -- cgit v1.2.3