Ensure correctly formatted color

This commit is contained in:
Dan Williams 2007-02-25 22:23:27 -05:00
parent a48fe93cc3
commit c1efa0a266

View File

@ -62,7 +62,7 @@ class RGBColor(object):
int(self._b * 65535))
def get_html(self):
return '#%x%x%x' % (self._r * 255, self._g * 255, self._b * 255)
return '#%02x%02x%02x' % (self._r * 255, self._g * 255, self._b * 255)
class HTMLColor(RGBColor):
def __init__(self, html_color):