diff options
Diffstat (limited to 'ricky/param/color.py')
| -rw-r--r-- | ricky/param/color.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ricky/param/color.py b/ricky/param/color.py index 5da05ed..7abc23a 100644 --- a/ricky/param/color.py +++ b/ricky/param/color.py @@ -35,10 +35,11 @@ class Color(Param): value = int(self.as_hex(), 16) return decimal.Decimal(value)/decimal.Decimal(maximum) - def randomize(self): + def randomize(self, probabilities=None): + if probabilities and self._choose_from_probabilities(probabilities): + return self.value = "rgb(%s,%s,%s)" % ( random.randint(0, 255), random.randint(0, 255), random.randint(0, 255) ) - self._is_rgb = True |
