Currently, when user cancels line color or face color selection dialog current color gets changed to black, as opposed to retaining the status quo. https://forum.freecadweb.org/viewtopic.php?f=3&t=29762 The fix is to test QColor.isValid(color), which returns false when the user cancels the QColor dialog.