34 hue = float(name.__hash__() % 0xFFFFFFFFFFFF) / 0xFFFFFFFFFFFF
36 (r, g, b) = colorsys.hsv_to_rgb(hue, 1, 0.8)
38 (r, g, b) = (int(r * 0xFF), int(g * 0xFF), int(b * 0xFF))
40 code =
'#%s%s%s' % (hex(r)[-2:], hex(g)[-2:], hex(b)[-2:])
42 return code.replace(
'x',
'0')