

def __updateUIFromColor(self):
    with Gaffer.BlockedConnection(self.__componentValueChangedConnections):
        c = self.getColor()
        for slider in self.__sliders.values():
            slider.setColor(c)
        for (component, index) in (('r', 0), ('g', 1), ('b', 2)):
            self.__sliders[component].setValue(c[index])
            self.__numericWidgets[component].setValue(c[index])
        if (c.dimensions() == 4):
            self.__sliders['a'].setValue(c[3])
            self.__numericWidgets['a'].setValue(c[3])
            self.__sliders['a'].parent().setVisible(True)
        else:
            self.__sliders['a'].parent().setVisible(False)
        c = c.rgbToHSV()
        for (component, index) in (('h', 0), ('s', 1), ('v', 2)):
            self.__sliders[component].setValue(c[index])
            self.__numericWidgets[component].setValue(c[index])

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