From fbbf9fcffe1c5b2cd623fd738e7344b7467f8b50 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sun, 20 Jul 2014 11:26:59 +0300 Subject: [PATCH] colorhash fix --- colorhash.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/colorhash.py b/colorhash.py index 3b4b0b7..ecd00d4 100755 --- a/colorhash.py +++ b/colorhash.py @@ -9,9 +9,9 @@ for line in lines: try: data = binascii.unhexlify(head) data = map(ord, data) - bars = ['\033[48;5;%dm \033[m' % (x,) for x in data] - bars = ''.join(bars) + bars = ['\033[48;5;%dm%02x\033[m' % (x, x) for x in data] + head = ''.join(bars) except TypeError: pass - print('%s: %s %s' % (bars, head, tail)) + print('%s %s' % (head, tail))