Skip to content

Commit

Permalink
Merge pull request #138 from EmbroidePy/readme-colors
Browse files Browse the repository at this point in the history
Include section on thread info manipulation
  • Loading branch information
tatarize authored Jan 4, 2022
2 parents 7ff2b30 + cc556e6 commit b11b77a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,18 @@ There are many fully qualified methods of manipulating patterns. For example if
pattern1 += pattern2
```

You can also do pattern3 = pattern1 + pattern2 but that requires making an new pattern. With the `__iadd__()` dunder you can also perform actions like adding a colorchange.
You can also do pattern3 = pattern1 + pattern2 but that requires making a new pattern. With the `__iadd__()` dunder you can also perform actions like adding a colorchange.

`pattern1 += "red"` will add a color change (if correct to do so), and a red thread to the threadlist.

Other elements like `pattern += ((0,0), (20,20), (0,0))` will also work to append stitches.

You can get a particular stitch of the pattern using `pattern[0]`. You can set string metadata elements `pattern['name'] = "My Design"`

### Thread Manipulation

If you wish to merely edit the thread colors these are located in the `.threadlist` attribute and you can call set a new `.color` or `.set_hex_color("#RRGGBB")`. You may also modify the various thread related metadata. This will be used for those embroidery types which preserve this thread information.

## Conversion

As pyembroidery is a fully fleshed out reader/writer within the mandate, it also does conversion.
Expand Down

0 comments on commit b11b77a

Please sign in to comment.