Facts, hacks and attacks from my life as a web application developer
creation of the final string is much easier with string formatting: return "#%02x%02x%02x" % tuple(new_rgb_int)ps: your usage of hex() does not guarantee you a result of two digits. hex(0) -> 0x0 -> 0. fail.
creation of the final string is much easier with string formatting: return "#%02x%02x%02x" % tuple(new_rgb_int)
ReplyDeleteps: your usage of hex() does not guarantee you a result of two digits. hex(0) -> 0x0 -> 0. fail.