def convert2hex(x):
    
    red = map(lambda c: "%02X" %int(round(c*255)), x['red'])
    green = map(lambda c: "%02X" %int(round(c*255)), x['green'])
    blue = map(lambda c: "%02X" %int(round(c*255)), x['blue'])
    
    return ["#"+"".join([r,g,b]) for r,g,b in itertools.izip(red,green,blue)]
Convert the given R G B floating numbers to string hexa-decimal color code (256, FF)
dataset/ETHPy150Open taoliu/taolib/Assoc/graphics.py/convert2hex