Better colour codes

This commit is contained in:
cs127 2023-03-13 18:00:04 +03:30
parent dcff08340e
commit 4d6743b886
6 changed files with 51 additions and 30 deletions

View file

@ -83,12 +83,12 @@ class ColorProfile:
for i, t in enumerate(txt):
if space_only and t != ' ':
if i > 0 and txt[i - 1] == ' ':
result += '\033[0m'
result += '\033[39;49m'
result += t
else:
result += colors[i].to_ansi(foreground=foreground) + t
result += '\033[0m'
result += '\033[39;49m'
return result
def lighten(self, multiplier: float) -> ColorProfile: