Skip to content

Commit 9bdb490

Browse files
Jérôme DeuchnordDeuchnord
authored andcommitted
fix(colors): use colors adapted on both dark and light background
1 parent 5661e60 commit 9bdb490

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_kosmorro/dumper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ def style(self, text: str, tag: str) -> str:
145145
return text
146146

147147
styles = {
148-
"h1": lambda t: colored(t, "yellow", attrs=["bold"]),
148+
"h1": lambda t: colored(t, "green", attrs=["bold"]),
149149
"h2": lambda t: colored(t, "magenta", attrs=["bold"]),
150-
"th": lambda t: colored(t, "white", attrs=["bold"]),
150+
"th": lambda t: colored(t, attrs=["bold"]),
151151
"strong": lambda t: colored(t, attrs=["bold"]),
152152
"em": lambda t: colored(t, attrs=["dark"]),
153153
}
154154

155-
return styles[tag](text)
155+
return styles.get(tag, lambda t: t)(text)
156156

157157
def stringify_ephemerides(self) -> str:
158158
data = []

0 commit comments

Comments
 (0)