def update_object_from_swatch(self, color_text):
        color = QtGui.QColor(*[int(part) for part in color_text.split(',')])
        self.value = self.factory.from_qt4_color(color)
        self.update_editor()

    #---------------------------------------------------------------------------
    #  Returns the text representation of a specified color value:
    #---------------------------------------------------------------------------
Updates the object trait when a color swatch is clicked.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/color_editor.py/CustomColorEditor.update_object_from_swatch