From b69a3137b4378bac88796ab1b6de169f4b290271 Mon Sep 17 00:00:00 2001 From: Mirko Lenz Date: Tue, 9 Jan 2024 10:33:56 +0100 Subject: [PATCH] fix: use different mono colors for node types --- arguebuf/model/node.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arguebuf/model/node.py b/arguebuf/model/node.py index c811f54..da4a34d 100644 --- a/arguebuf/model/node.py +++ b/arguebuf/model/node.py @@ -39,7 +39,8 @@ def __init__( self.border = border or self.bg -COLOR_MONOCHROME = Color(bg="#ffffff", fg="#000000", border="#000000") +COLOR_MONOCHROME_LIGHT = Color(bg="#ffffff", fg="#000000", border="#000000") +COLOR_MONOCHROME_DARK = Color(bg="#000000", fg="#ffffff", border="#000000") scheme2color: dict[type[Scheme], Color] = { @@ -153,7 +154,7 @@ def __repr__(self): def color(self, major_claim: bool, monochrome: bool) -> Color: """Get the color for rendering the node.""" if monochrome: - return COLOR_MONOCHROME + return COLOR_MONOCHROME_LIGHT return Color(bg="#0D47A1") if major_claim else Color(bg="#2196F3") @@ -208,7 +209,7 @@ def label(self) -> str: def color(self, major_claim: bool, monochrome: bool) -> Color: """Get the color used in OVA based on `category`.""" if monochrome: - return COLOR_MONOCHROME + return COLOR_MONOCHROME_DARK return scheme2color[type(self.scheme)] if self.scheme else Color(bg="#009688")