summaryrefslogtreecommitdiff
path: root/lib/threads/color.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-06-29 06:56:15 +0200
committerGitHub <noreply@github.com>2025-06-29 06:56:15 +0200
commit81e48c151b5d55703049163c441538c041e31ff5 (patch)
treef0dacdc3a1725839ec92d3fddf5d1ec6b6b9189a /lib/threads/color.py
parentc7102e6cece6551f7d5a74f6e3350967fab1741d (diff)
parent454b5ee1a00e9d4b96f5f057a8611da68a6cc796 (diff)
Merge pull request #3825 from not-my-profile/support-bundled-inkex
Revert "add icc color workaround (#3687)" and use 1.4.x inkex
Diffstat (limited to 'lib/threads/color.py')
-rw-r--r--lib/threads/color.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/threads/color.py b/lib/threads/color.py
index 26da78d5..699f4448 100644
--- a/lib/threads/color.py
+++ b/lib/threads/color.py
@@ -5,7 +5,7 @@
import colorsys
-from inkex import Color, ColorCMS
+from inkex import Color
from pyembroidery.EmbThread import EmbThread
@@ -33,12 +33,7 @@ class ThreadColor(object):
self.rgb = (color.get_red(), color.get_green(), color.get_blue())
return
elif isinstance(color, str):
- # This will catch icc colors which cannot be parsed as rgb colors directly
- if isinstance(Color(color), ColorCMS):
- # The icc color has a hex color prepended.
- # The easiest way to receive a color value is therefore to just use the hex color from the front.
- color = color.split()[0]
- self.rgb = tuple(Color(color).to('rgb').get_values(False))
+ self.rgb = tuple(Color(color).to('rgb'))
elif isinstance(color, (list, tuple)):
self.rgb = tuple(color)
else: