Ejemplo n.º 1
0
    def setHSV(self, h, s, v):
        # To prevent value oscillation 
        if (round(h), round(s), round(v)) == (round(self.__hCache), round(self.__sCache), round(self.__vCache)):
            return
           
        self.__h = h
        self.__s = s
        self.__v = v

        (self.__r, self.__g, self.__b) = ColorUtil.hsv2rgb(self.__h, self.__s, self.__v)
        (self.__rCache, self.__gCache, self.__bCache) = (self.__r, self.__g, self.__b)
        
        self.notifyObservers()