def color_from_qcolor(q):
    if not q.isValid():
        return None
    return Color(q.red(), q.green(), q.blue(), q.alpha())


# Guard flags
Convert a QColor into an Enaml Color.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_color_dialog.py/color_from_qcolor