Esempio n. 1
0
def make_thread(color):
    thread = libembroidery.EmbThread()
    thread.color = libembroidery.embColor_make(*color.rgb)

    thread.description = color.name
    thread.catalogNumber = ""

    return thread
Esempio n. 2
0
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