Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/set_rgb.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysamples/set_rgb.py')
-rw-r--r--pysamples/set_rgb.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pysamples/set_rgb.py b/pysamples/set_rgb.py
index d4baa48..b77d9df 100644
--- a/pysamples/set_rgb.py
+++ b/pysamples/set_rgb.py
@@ -13,7 +13,6 @@
def myblock(tw, rgb_array):
''' Set rgb color from values '''
- rgb = "#%02x%02x%02x" % ((int(rgb_array[0]) % 256),
- (int(rgb_array[1]) % 256),
- (int(rgb_array[2]) % 256))
- tw.canvas.fgcolor = tw.canvas.cm.alloc_color(rgb)
+ tw.canvas.fgrgb = [(int(rgb_array[0]) % 256),
+ (int(rgb_array[1]) % 256),
+ (int(rgb_array[2]) % 256)]