From 8abfb50aed87e7ed4cd76abc6853fa0a1d19f462 Mon Sep 17 00:00:00 2001 From: pagedown Date: Tue, 21 Dec 2021 17:51:00 +0800 Subject: [PATCH] Ignore invalid title bar color --- kitty/options/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 745f09af2..5e6227f08 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -686,7 +686,11 @@ def titlebar_color(x: str) -> int: return 0 if x == 'background': return 1 - return (color_as_int(to_color(x)) << 8) | 2 + try: + return (color_as_int(to_color(x)) << 8) | 2 + except ValueError: + log_error(f'Ignoring invalid title bar color: {x}') + return 0 def macos_titlebar_color(x: str) -> int: