def _parse_html_colour(colour):
    """
    Return a thruple of the red, green and blue elements of an HTML colour string
    """
    colour = colour.lstrip('#')
    if len(colour) == 3:
        colour = "{}{}{}".format(
            colour[0] * 2,
            colour[1] * 2,
            colour[2] * 2,
        )
    return (
        int(colour[0:2], base=16),
        int(colour[2:4], base=16),
        int(colour[4:6], base=16),
    )