fix make color string

This commit is contained in:
Denis Fomin 2013-01-06 03:57:53 +04:00
parent 94168c01ae
commit 4bf62193f3
1 changed files with 2 additions and 1 deletions

View File

@ -641,7 +641,8 @@ def make_color_string(color):
"""
col = '#'
for i in ('red', 'green', 'blue'):
h = hex(getattr(color, i) / (16*16)).split('x')[1]
h = hex(int(getattr(color, i) / (16*16)))
h = h.split('x')[1]
if len(h) == 1:
h = '0' + h
col += h