def _enforceDataType(self, data):
        """ Converts to str so that this CTI always stores that type.
        """
        qColor = QtGui.QColor(data)    # TODO: store a RGB string?
        if not qColor.isValid():
            raise ValueError("Invalid color specification: {!r}".format(data))
        return qColor
def _enforceDataType ( self , data ) : qColor = QtGui . QColor ( data ) if not qColor . isValid ( ) : raise ValueError ( "Invalid color specification: {!r}" . format ( data ) ) return qColor
Converts to str so that this CTI always stores that type.