summaryrefslogtreecommitdiff
path: root/lib/threads/color.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2021-10-19 17:41:29 +0200
committerGitHub <noreply@github.com>2021-10-19 17:41:29 +0200
commitcf09a8642614cd87ad644ee58dd1599f9c8a9b6d (patch)
treeeebfbf7af7ff2771d565d926428977112315c7ed /lib/threads/color.py
parent9deff1bd9a9119a9473aa6387f5b0e64a6ec1e5f (diff)
color gradient to black (#1395)
Diffstat (limited to 'lib/threads/color.py')
-rw-r--r--lib/threads/color.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/threads/color.py b/lib/threads/color.py
index 69a70798..4a2f58e6 100644
--- a/lib/threads/color.py
+++ b/lib/threads/color.py
@@ -15,6 +15,10 @@ class ThreadColor(object):
hex_str_re = re.compile('#([0-9a-z]{3}|[0-9a-z]{6})', re.I)
def __init__(self, color, name=None, number=None, manufacturer=None):
+ # set colors with a gradient to black (avoiding an error message)
+ if type(color) == str and color.startswith('url'):
+ color = None
+
if color is None:
self.rgb = (0, 0, 0)
elif isinstance(color, EmbThread):