def _color_to_brush(self, color):
        """ Returns a QBrush with the color specified in **color** """
        brush = QtGui.QBrush()
        if isinstance(color, basestring) and hasattr(QtCore.Qt, color):
            col = getattr(QtCore.Qt, color)
        elif isinstance(color, tuple) and len(color) == 3:
            col = QtGui.QColor()
            col.setRgb(*color)
        else:
            raise RuntimeError(color % "Invalid color specification '%r'")

        brush.setColor(col)
        return brush
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/styled_date_editor.py/CustomEditor._color_to_brush/swapped operands of `%`