def MakeGray(rgbTuple, factor, maskColour):
    """
    Make a pixel grayed-out.

    If the pixel matches the `maskColour`, it won't be changed.

    :param tuple `rgbTuple`: a tuple representing a pixel colour;
    :param integer `factor`: a graying-out factor;
    :param Colour `maskColour`: a colour mask.
    """

    if rgbTuple != maskColour:
        r, g, b = rgbTuple
        return map(lambda x: int((x - 230) * factor) + x, (r, g, b))
    else:
        return rgbTuple
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/wx/wx_upstream/aui/aui_utilities.py/MakeGray/swapped operands of `-`