summaryrefslogtreecommitdiff
path: root/ricky/param/color.py
diff options
context:
space:
mode:
authorpepperpepperpepper <pepper@scannerjammer.com>2015-11-29 17:43:44 -0800
committerpepperpepperpepper <pepper@scannerjammer.com>2015-11-29 17:43:44 -0800
commit9a7bf3bffb2a8459e66b988aaff53611723b5ab4 (patch)
treecc4ef0de15e22f5c6e5f8d2ecf16db0486d7a8ff /ricky/param/color.py
parent10a619b2c7227b2ad214fbb985141b884fbe87fb (diff)
required=0, -e commit message for your changes. Lines starting
Diffstat (limited to 'ricky/param/color.py')
-rw-r--r--ricky/param/color.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/ricky/param/color.py b/ricky/param/color.py
index 4d9f4d5..4d88b90 100644
--- a/ricky/param/color.py
+++ b/ricky/param/color.py
@@ -17,21 +17,8 @@ class Color(Param):
@value.setter
def value(self, value):
self._value = value
- if self._value is not None:
- self.is_ready = 1
- self.set_by_user = 1
def randomize(self):
- weights_total = sum(
- map(lambda x: x["weight"], self.selections())
- ) + (255 * 255 * 255)
- choice = random.randint(0, weights_total)
- position = 0
- for elem in self.selections():
- position += elem["weight"]
- if position >= choice:
- self.value = elem["value"]
- return
self.value = "rgb(%s,%s,%s)" % (
random.randint(0, 255),
random.randint(0, 255),