def hex2rgb(hex_str: str) -> tuple:
    """
    Converts HEX format to RGB
    :param hex_str:
    :return: tuple(r, g, b)
    """
    hex_str = hex_str.lstrip('#')
    return tuple(int(hex_str[i:i + 2], 16) for i in (0, 2, 4))