From d9651ca5fb6c655afbe88a014c8bb8a8f000a70d Mon Sep 17 00:00:00 2001 From: Pepper Date: Sun, 8 Mar 2015 18:25:42 -0400 Subject: fixes --- Pb_Api/Param/Color.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Pb_Api/Param/Color.py') 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) -- cgit v1.2.3-70-g09d2