def hex_to_rgb(hex_color):
    """Converts a HEX color to a tuple of RGB values.

    Parameters:
        hex_color (str): Input hex color string.

    Returns:
        tuple: RGB color values.
    """
    hex_color = hex_color.lstrip("#")
    if len(hex_color) == 3:
        hex_color = hex_color * 2
    return int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16)