From 91eb812f1181c9fc50cf0abc31e01f42f76d3b04 Mon Sep 17 00:00:00 2001 From: David Mazary Date: Sun, 18 Mar 2012 16:40:18 -0300 Subject: [PATCH] round and int rgb css color values --- xonstat/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xonstat/util.py b/xonstat/util.py index e34adfc..de5153a 100755 --- a/xonstat/util.py +++ b/xonstat/util.py @@ -91,7 +91,7 @@ def hex_repl(match): if light < _contrast_threshold: light = _contrast_threshold # Get new rgb in 0-255 scale - r, g, b = tuple([255 * i for i in hls_to_rgb(hue, light, satur)]) + r, g, b = tuple([int(round(255 * i)) for i in hls_to_rgb(hue, light, satur)]) return ''.format(r, g, b) -- 2.39.2