Friday, July 29, 2011

Python: calculate lighter/darker RGB colors

1 comment:

  1. 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.

    ReplyDelete