def from_html(color):
    """Convert html hex code to rgb."""
    if len(color) != 7 or color[0] != '#':
        raise ValueError('Invalid length of html code')
    return int(color[1:3], 16), int(color[3:5], 16), int(color[5:7], 16)
