Skip to content

Commit

Permalink
fix: use different mono colors for node types
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Jan 9, 2024
1 parent e47f857 commit b69a313
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arguebuf/model/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit b69a313

Please sign in to comment.