def hex_to_rgb(hex_color: str, alpha: float) -> str:
    """Convert color in hex to rgb and add alpha channel"""

    hex_color = hex_color.lstrip('#')
    r = int(hex_color[0:2], 16)
    g = int(hex_color[2:4], 16)
    b = int(hex_color[4:6], 16)

    return f"rgba({r}, {g}, {b}, {alpha:.2f})"