From 16d334a4b6ecfdba91eafb6c1f2a07f020e4666b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 30 Sep 2024 11:14:32 +0530 Subject: [PATCH] Fix #7912 --- kitty/options/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 9dbfa3352..eb8c2cd92 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -1562,7 +1562,7 @@ def transparent_background_colors(spec: str) -> Tuple[Tuple[Color, float], ...]: for part in spec.split(): col, sep, alpha = part.partition('@') c = to_color(col) - o = unit_float(alpha) if alpha else -1 + o = max(-1, min(float(alpha) if alpha else -1, 1)) if (idx := seen.get(c)) is not None: ans[idx] = c, o continue