diff options
Diffstat (limited to 'ricky/param/color.py')
| -rw-r--r-- | ricky/param/color.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ricky/param/color.py b/ricky/param/color.py index ecec79c..4d9f4d5 100644 --- a/ricky/param/color.py +++ b/ricky/param/color.py @@ -23,11 +23,11 @@ class Color(Param): def randomize(self): weights_total = sum( - map(lambda x: x["weight"], self.options()) + map(lambda x: x["weight"], self.selections()) ) + (255 * 255 * 255) choice = random.randint(0, weights_total) position = 0 - for elem in self.options(): + for elem in self.selections(): position += elem["weight"] if position >= choice: self.value = elem["value"] |
