From 0f23edeec372189fc9cb2eb3b7cfe5d78e410a1c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 7 Nov 2021 07:15:55 +0530 Subject: [PATCH] Fix breakage caused by Color no longer being iterable --- kittens/themes/collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kittens/themes/collection.py b/kittens/themes/collection.py index 63cbd8f63..50465ef57 100644 --- a/kittens/themes/collection.py +++ b/kittens/themes/collection.py @@ -447,8 +447,8 @@ class LineParser: def parse_theme(fname: str, raw: str, exc_class: Type[BaseException] = SystemExit) -> Dict[str, Any]: lines = raw.splitlines() conf = parse_config(lines) - bg = conf.get('background', Color()) - is_dark = max(bg) < 115 + bg: Color = conf.get('background', Color()) + is_dark = max((bg.red, bg.green, bg.blue)) < 115 ans: Dict[str, Any] = {'name': theme_name_from_file_name(fname)} parser = LineParser() for i, line in enumerate(raw.splitlines()):