def GetComplementaryColor(hexStr):
    """Returns complementary RGB color

    Example Usage:

        >>> GetComplementaryColor('#FFFFFF')
        '#000000'

    """
    if hexStr[0] == '#':
        hexStr = hexStr[1:]
    rgb = (hexStr[0:2], hexStr[2:4], hexStr[4:6])
    compColor = '#'
    for a in rgb:
        compColor += '%02x' % (255 - int(a, 16))
    ## print('complementaryColor = ', compColor)
    if hexStr.isupper():
        return compColor.upper()  # Retain case.
    return compColor