Esempio n. 1
0
 def render(self, argon):
     self.update()
     v1 = hsva(self.hue, self.saturation, 1.0).rgba
     x0, y0 = self.major.interpolate((self.hue/360.0, self.saturation))
     x1, y1 = self.minor.interpolate((0, 1-self.value))
     argon.render([
         (self.rect, black, argon.plain),
         (self.major.rect, white.mix(black, self.value), self.gradient),
         (self.minor.rect, (v1, v1, black, black), argon.plain),
         (self.preview.rect, self.rgba, argon.plain),
         ((x0, y0, 1, 1), black, argon.plain),
         ((x1, y1, 30, 1), black, argon.plain),
     ])
Esempio n. 2
0
 def rgba(self):
     return hsva(self.hue, self.saturation, self.value).rgba