From 5a0215deac647f52da3e24dc47057af3b132654e Mon Sep 17 00:00:00 2001 From: Scott Wichser Date: Sat, 26 Jan 2019 02:09:16 +0000 Subject: Ensure we're working with all integers in the _colourDistance function to avoid an unsupported operand error. --- local/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/utility.py b/local/utility.py index 40addd4..391051d 100644 --- a/local/utility.py +++ b/local/utility.py @@ -267,7 +267,7 @@ def _hex_to_rgb(value): def _colourDistance(a, b): # Source: http://www.compuphase.com/cmetric.htm - rmean = (a[0] + b[0]) / 2 + rmean = math.floor((a[0] + b[0]) / 2) red = a[0] - b[0] green = a[1] - b[1] blue = a[2] - b[2] -- cgit v1.2.3