def rgb_color(color: str) -> tuple:
    """Convert an RGB color string to an RGB tuple.

    >>> rgb_color('#fff')
    (15, 15, 15)
    >>> rgb_color('#500100')
    (80, 1, 0)
    """
    color = color.lstrip('#')
    if len(color) == 3:
        return (int(color[0], 16),
                int(color[1], 16),
                int(color[2], 16))
    elif len(color) == 6:
        return (int(color[0:2], 16),
                int(color[2:4], 16),
                int(color[4:6], 16))
    else:
        raise ValueError(f'RGB color strings must have 3 or 6 digits')