fix color parser

This commit is contained in:
Yann Leboulanger 2005-12-18 10:38:33 +00:00
parent 05587d371f
commit c687ad17b1
1 changed files with 2 additions and 3 deletions

View File

@ -467,6 +467,5 @@ def make_python_month_gtk_month(month):
def make_color_string(color):
'''create #aabbcc color string from gtk color'''
return '#' + (hex(color.red) + '0')[2:4] + \
(hex(color.green) + '0')[2:4] + \
(hex(color.blue) + '0')[2:4]
return '#' + hex(color.red)[-2:] + hex(color.green)[-2:] + \
hex(color.blue)[-2:]