Support '99' as a 'transparent' irc color code
This commit is contained in:
parent
85840a68dd
commit
d5467aefe9
2 changed files with 19 additions and 17 deletions
|
@ -35,6 +35,7 @@ LIGHTBLUE = _color("light blue", 12, 94, False)
|
|||
PINK = _color("pink", 13, 95, False)
|
||||
GREY = _color("grey", 14, 90, False)
|
||||
LIGHTGREY = _color("light grey", 15, 37, False)
|
||||
TRANSPARENT = _color("transparent", 99, 39, False)
|
||||
|
||||
BOLD = "\x02"
|
||||
ITALIC = "\x1D"
|
||||
|
|
|
@ -163,7 +163,8 @@ def _color_tokens(s: str) -> typing.List[str]:
|
|||
if can_add:
|
||||
current_color = background if is_background else foreground
|
||||
if current_color:
|
||||
can_add = int(current_color + char) <= 15
|
||||
next_color = int(current_color + char)
|
||||
can_add = next_color <= 15 or next_color = 99
|
||||
|
||||
if can_add:
|
||||
if is_background:
|
||||
|
|
Loading…
Reference in a new issue