diff options
Diffstat (limited to 'pixelterm.py')
-rwxr-xr-x | pixelterm.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pixelterm.py b/pixelterm.py index 9f8dfb6..5db15a1 100755 --- a/pixelterm.py +++ b/pixelterm.py @@ -26,7 +26,8 @@ def termify_pixels(img): return '\033[49m' if color in bgd: return bgd[color] - bgd[color] = '\033[48;5;'+str(formatter._closest_color(color))+'m' + r,g,b,_ = color + bgd[color] = '\033[48;5;'+str(formatter._closest_color(r,g,b))+'m' return bgd[color] def fgescape(color): @@ -34,7 +35,8 @@ def termify_pixels(img): if fg == color: return '' fg=color - fgd[color] = '\033[38;5;'+str(formatter._closest_color(color))+'m' + r,g,b,_ = color + fgd[color] = '\033[38;5;'+str(formatter._closest_color(r,g,b))+'m' return fgd[color] def balloon(x,y): |