Changed backgrounnd ANSI flag from - to [
This commit is contained in:
parent
09ee3c3f2c
commit
d69f4dc674
2 changed files with 6 additions and 6 deletions
|
|
@ -597,15 +597,15 @@ class CmdColorTest(MuxPlayerCommand):
|
||||||
# foreground table
|
# foreground table
|
||||||
table[ir].append("{%i%i%i%s{n" % (ir, ig, ib, "{{%i%i%i" % (ir, ig, ib)))
|
table[ir].append("{%i%i%i%s{n" % (ir, ig, ib, "{{%i%i%i" % (ir, ig, ib)))
|
||||||
# background table
|
# background table
|
||||||
table[6+ir].append("{-%i%i%i{%i%i%i%s{n" % (ir, ig, ib,
|
table[6+ir].append("{[%i%i%i{%i%i%i%s{n" % (ir, ig, ib,
|
||||||
5 - ir, 5 - ig, 5 - ib,
|
5 - ir, 5 - ig, 5 - ib,
|
||||||
"{{-%i%i%i" % (ir, ig, ib)))
|
"{{[%i%i%i" % (ir, ig, ib)))
|
||||||
table = self.table_format(table)
|
table = self.table_format(table)
|
||||||
string = "Xterm256 colors (if not all hues show, your client might not report that it can handle xterm256):"
|
string = "Xterm256 colors (if not all hues show, your client might not report that it can handle xterm256):"
|
||||||
for row in table:
|
for row in table:
|
||||||
string += "\n" + "".join(row)
|
string += "\n" + "".join(row)
|
||||||
self.msg(string)
|
self.msg(string)
|
||||||
self.msg("(e.g. %%c123 and %%cb123 also work)")
|
self.msg("(e.g. %%123 and %%[123 also work)")
|
||||||
else:
|
else:
|
||||||
# malformed input
|
# malformed input
|
||||||
self.msg("Usage: @color ansi|xterm256")
|
self.msg("Usage: @color ansi|xterm256")
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class ANSIParser(object):
|
||||||
return ""
|
return ""
|
||||||
rgbtag = rgbmatch.groups()[0]
|
rgbtag = rgbmatch.groups()[0]
|
||||||
|
|
||||||
background = rgbtag[0] == '-'
|
background = rgbtag[0] == '['
|
||||||
if background:
|
if background:
|
||||||
red, green, blue = int(rgbtag[1]), int(rgbtag[2]), int(rgbtag[3])
|
red, green, blue = int(rgbtag[1]), int(rgbtag[2]), int(rgbtag[3])
|
||||||
else:
|
else:
|
||||||
|
|
@ -254,9 +254,9 @@ class ANSIParser(object):
|
||||||
|
|
||||||
xterm256_map = [
|
xterm256_map = [
|
||||||
(r'%([0-5]{3})', parse_rgb), # %123 - foreground colour
|
(r'%([0-5]{3})', parse_rgb), # %123 - foreground colour
|
||||||
(r'%(-[0-5]{3})', parse_rgb), # %-123 - background colour
|
(r'%(\[[0-5]{3})', parse_rgb), # %-123 - background colour
|
||||||
(r'{([0-5]{3})', parse_rgb), # {123 - foreground colour
|
(r'{([0-5]{3})', parse_rgb), # {123 - foreground colour
|
||||||
(r'{(-[0-5]{3})', parse_rgb) # {-123 - background colour
|
(r'{(\[[0-5]{3})', parse_rgb) # {-123 - background colour
|
||||||
]
|
]
|
||||||
|
|
||||||
# obs - order matters here, we want to do the xterms first since
|
# obs - order matters here, we want to do the xterms first since
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue