def hexinv(hexstring):
    """
    Convenience function to calculate the inverse color (opposite on the color wheel).
    e.g.: hexinv('#FF0000') = '#00FFFF'
    
    Parameters
    ----------
    hexstring : str
        Hexadecimal string such as '#FF0000'
    Returns
    -------
    str
        Hexadecimal string such as '#00FFFF'
    """
    if hexstring[0]=='#': hexstring=hexstring.lstrip('#')
    hexcolor=int(hexstring,16)
    color_comp=0xFFFFFF^hexcolor
    hexcolor_comp="#%06X"%color_comp
    return hexcolor_comp