diff options
| author | Pepper <pepper@scannerjammer.com> | 2015-03-08 18:25:42 -0400 |
|---|---|---|
| committer | Pepper <pepper@scannerjammer.com> | 2015-03-08 18:25:42 -0400 |
| commit | d9651ca5fb6c655afbe88a014c8bb8a8f000a70d (patch) | |
| tree | cdd939a8a8192fe6f6b439a6098ad55b56dabf0f /Pb_Api/Param/Color.py | |
| parent | 193178ea8a038b183388999a2853433cf45a054c (diff) | |
fixes
Diffstat (limited to 'Pb_Api/Param/Color.py')
| -rw-r--r-- | Pb_Api/Param/Color.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Pb_Api/Param/Color.py b/Pb_Api/Param/Color.py index 88bd9bd..1c14c8d 100644 --- a/Pb_Api/Param/Color.py +++ b/Pb_Api/Param/Color.py @@ -8,6 +8,7 @@ class Pb_Api_Param_Color(Pb_Api_Param_MultiSelect): def from_rgb(cls, r,g,b): return cls(value="rgb({},{},{})".format(r,g,b)) + def randomize(self): weights_total = sum(map(lambda x: x["weight"], self.options()) + (255 * 255 * 255) choice = random.randint(0, weights_total) |
