def contrast(color):
    """Compute luminous efficiency of given color and return either
    white or black based on which would contrast more.
    """
    # I know this is not exact; just my guess
    R = eval('0x'+color[1:3])
    G = eval('0x'+color[3:5])
    B = eval('0x'+color[5:7])
    lumen = 0.6*R + G + 0.3*B
    if lumen > 250:
        return "#000000"
    else:
        return "#FFFFFF"