aboutsummaryrefslogtreecommitdiff
path: root/pixelterm.py
diff options
context:
space:
mode:
authorjaseg <s@jaseg.de>2013-04-07 01:48:35 +0200
committerjaseg <s@jaseg.de>2013-04-07 01:48:35 +0200
commitefbf9145c32c60021f8224b5644727bbe3505767 (patch)
treec0fb86c9b10f040bab5f8dd236542e8db42bdc22 /pixelterm.py
parenta82ff75260da230d9048883936fb13a02c18c0c4 (diff)
downloadpixelterm-efbf9145c32c60021f8224b5644727bbe3505767.tar.gz
pixelterm-efbf9145c32c60021f8224b5644727bbe3505767.tar.bz2
pixelterm-efbf9145c32c60021f8224b5644727bbe3505767.zip
Small syntax fix
Diffstat (limited to 'pixelterm.py')
-rwxr-xr-xpixelterm.py6
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):