def rgb_to_hex(color):
    """RGB 3-list or RGBA 4-list to hex string! But ignore alpha channel."""
    color = tuple((color[0], color[1], color[2]))  # remove alpha channel!
    return '#%02x%02x%02x' % color