# HG changeset patch # User drewp@bigasterisk.com # Date 1497149794 0 # Node ID 6fefdc0c2c69c075788278890077fb41859c54a7 # Parent c2af36d6fa6b75a103eb34fdc54b39f8cd21ec81 more rgb_to_hex fixes Ignore-this: fe3710525964a1a74a8b38267e8ed668 diff -r c2af36d6fa6b -r 6fefdc0c2c69 light9/effect/effecteval.py --- a/light9/effect/effecteval.py Sun Jun 11 02:53:47 2017 +0000 +++ b/light9/effect/effecteval.py Sun Jun 11 02:56:34 2017 +0000 @@ -15,7 +15,7 @@ log = logging.getLogger('effecteval') def literalColor(rnorm, gnorm, bnorm): - return Literal(rgb_to_hex([rnorm * 255, gnorm * 255, bnorm * 255])) + return Literal(rgb_to_hex([int(rnorm * 255), int(gnorm * 255), int(bnorm * 255)])) def literalColorHsv(h, s, v): return literalColor(*hsv_to_rgb(h, s, v)) @@ -296,7 +296,7 @@ offset = 0 f = (((songTime + offset) * rate) % 1.0) c = (f < duty) * strength - col = rgb_to_hex([c * 255, c * 255, c * 255]) + col = rgb_to_hex([int(c * 255), int(c * 255), int(c * 255)]) return {(L9['device/colorStrip'], L9['color']): Literal(col)} def effect_lightning(effectSettings, strength, songTime, noteTime): @@ -310,7 +310,7 @@ L9['device/hexLow5'], L9['device/lip1 5'], L9['device/postL1'], L9['device/postR1']] out = {} - col = rgb_to_hex([255 * strength] * 3) + col = rgb_to_hex([int(255 * strength)] * 3) for i, dev in enumerate(devs): n = noise(songTime * 8 + i * 6.543) if n > .4: