-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colour charts #21
Comments
Since we're using Pillow for charts, we could pretty much use any way to specify colour that it understands: https://pillow.readthedocs.io/en/stable/reference/ImageColor.html I'm guessing the hexidecimal represented as |
Hey, I found this project off the video of your presentation at PyCon last year, and I'm new to open source, but keen to get involved. I've tinkered a bit with the charting module, and got something that might be useful. For the color picking, the ipywidgets module provides a ColorPicker that can be used within the notebook: And I've extended the charting to do a 2D chart, using the triangle hat example from the docs: I'm not sure how to test the charting functions I've written, and not sure how the PR process works. Do I get everything back into my main branch before raising a PR? Still need to figure out the parsing on the 2D charts for splitting rows/ ignoring repeats for the chart. (I've also added a bit to work for Issue #30, using pngs for the symbols.) The logic for either of these could easily be ported to svg, which might make styling the chart as a whole easier, as well as allowing better scaling |
This looks amazing. I'd love to see it integrated! The PR process usually goes like this:
You don't have to have a separate branch if you want to do a pull request using your fork's main branch, but I find it a lot easier to have each pull request in a separate branch so you can have lots of pull requests going at the same time if you want and so I can keep my main branch in sync with upstream/origin. |
Currently the charting software expects a symbol (see #10) , but for colourwork knitting we'd probably want to accept a colour value in the legend and have it fill the square with that colour.
Here's an example of a fairly typical colourwork motif as part of a pattern:
https://www.dummies.com/crafts/knitting/knitting-projects/how-to-knit-a-headband-with-a-fair-isle-snowflake-pattern/
two-colour patterns are often represented as dark grey and white for various reasons (good contrast for most types of vision, less distraction if you're knitting in an alternate colour, cheaper to print) but we'd likely want to accept any arbitrary colour so folks doing interactive patterns could change the legend to suit their preferences in the moment.
The text was updated successfully, but these errors were encountered: