Ejemplo n.º 1
0
    def _get_dialog_color(start_color):
        color = start_color

        qt_col = QtGui.QColorDialog.getColor(start_color.to_qt())
        if qt_col.isValid():
            color = Color.from_qt(qt_col)

        return color
Ejemplo n.º 2
0
    def _get_dialog_color(start_color):
        color = start_color

        qt_col = QColorDialog.getColor(start_color.to_qt())
        if qt_col.isValid():
            color = Color.from_qt(qt_col)

        return color
    def test_from_qt_returns_QColour_of_rgba_as_zero255(self):

        qtcolor = Color.to_qt(self.firstColor)
        actual = Color.from_qt(qtcolor)

        self.assertEqual(Color.bgra(actual),  (100, 50, 10, 255))