diff --git a/lib/color_compliment.py b/lib/color_compliment.py
index <HASH>..<HASH> 100755
--- a/lib/color_compliment.py
+++ b/lib/color_compliment.py
@@ -5,11 +5,13 @@ try:
     from md5 import md5
 except ImportError:
     from hashlib import md5
-from sys import argv
+import sys
 
 # Original, non-relative import errors on Python3
 from .colortrans import *
 
+py3 = sys.version_info.major == 3
+
 
 def getOppositeColor(r,g,b):
     hls = rgb_to_hls(r,g,b)
@@ -32,6 +34,10 @@ def getOppositeColor(r,g,b):
     return tuple([ int(x) for x in opp])
 
 def stringToHashToColorAndOpposite(string):
+    # Python3: Unicode string must be encoded before digest
+    # Python2.7: works either way, but check in case breaks earlier py2
+    if py3:
+        string = string.encode('utf-8')
     string = md5(string).hexdigest()[:6] # get a random color
     color1 = rgbstring2tuple(string)
     color2 = getOppositeColor(*color1)
Fix unicode digest error on Py3

Encoding works on Py<I>, but will only encode if Py3 in case
it breaks earlier Py2.x