def make_thread(color): thread = libembroidery.EmbThread() thread.color = libembroidery.embColor_make(*color.rgb) thread.description = color.name thread.catalogNumber = "" return thread
def make_thread(color): # strip off the leading "#" if color.startswith("#"): color = color[1:] thread = libembroidery.EmbThread() thread.color = libembroidery.embColor_fromHexStr(color) thread.description = color thread.catalogNumber = "" return thread