

def __setColorInternal(self, color, reason):
    dragBeginOrEnd = (reason in (GafferUI.NumericSlider.PositionChangedReason.DragBegin, GafferUI.NumericSlider.PositionChangedReason.DragEnd, GafferUI.NumericWidget.ValueChangedReason.DragBegin, GafferUI.NumericWidget.ValueChangedReason.DragEnd))
    if ((color != self.__color) or dragBeginOrEnd):
        self.__color = color
        self.__colorSwatch.setColor(color)
        self.__colorChangedSignal(self, reason)
    self.__updateUIFromColor()

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/ColorChooser.py ColorChooser.__setColorInternal/original