def name2rgb ( hue ) : r , g , b = colorsys . hsv_to_rgb ( hue / 360.0 , .8 , .7 ) return tuple ( int ( x * 256 ) for x in [ r , g , b ] )
change rgb to graysclae with 3 value in python
Originally used to calculate color based on module name .
def name2rgb(hue):
    """Originally used to calculate color based on module name.
    """
    r, g, b = colorsys.hsv_to_rgb(hue / 360.0, .8, .7)
    return tuple(int(x * 256) for x in [r, g, b])