From 022ff28d946097503603f5cae2a9bdea122be6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 2 May 2013 17:22:16 +0000 Subject: [PATCH] 6656: division on hexadecimalcolor svn: r22145 --- gramps/gui/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gramps/gui/utils.py b/gramps/gui/utils.py index ce338cc70..2368bbbba 100644 --- a/gramps/gui/utils.py +++ b/gramps/gui/utils.py @@ -475,7 +475,7 @@ def hex_to_rgb_float(value): def hex_to_rgb(value): """ - Convert a hexademical value #FF00FF to rgb. Returns tuple of integers + Convert a hexadecimal value #FF00FF to rgb. Returns tuple of integers """ value = value.lstrip('#') lenv = len(value) @@ -495,7 +495,7 @@ def color_to_hex(color): """Convert Gdk.Color to hex string.""" hexstring = "" for col in 'red', 'green', 'blue': - hexfrag = hex(getattr(color, col) / (16 * 16)).split("x")[1] + hexfrag = hex(getattr(color, col) // (16 * 16)).split("x")[1] if len(hexfrag) < 2: hexfrag = "0" + hexfrag hexstring += hexfrag