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 :
			# we never optimise away drag begin or end, because it's important
			# that they emit in pairs.
			self.__color = color
			self.__colorSwatch.setColor( color )
			self.__colorChangedSignal( self, reason )

		## \todo This is outside the conditional because the clamping we do
		# in __componentValueChanged means the color value may not correspond
		# to the value in the ui, even if it hasn't actually changed. Move this
		# back inside the conditional when we get the clamping performed internally
		# in NumericWidget.
		self.__updateUIFromColor()
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/ColorChooser.py/ColorChooser.__setColorInternal/operator `!=` -> `<=`