def get_color(card):
    """Returns the card's color

    Args:
        card (webelement): a visible card

    Returns:
        str: card's color
    """
    color = card.find_element_by_xpath(".//div/*[name()='svg']/*[name()='use'][2]").get_attribute("stroke")

    # both light and dark theme
    if (color == "#ff0101" or color == "#ffb047"):
        color = "red"
    elif (color == "#800080" or color == "#ff47ff"):
        color = "purple"
    else:
        color = "green"
    
    return color