def rgb2hex(rgb):
    a = '#%02x%02x%02x' % tuple([int(np.round(val * 255)) for val in rgb[:3]])
    return a
Given an rgb or rgba sequence of 0-1 floats, return the hex string
dataset/ETHPy150Open inpho/topic-explorer/topicexplorer/lib/color.py/rgb2hex