Skip to content
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

resistor/inductor/cap colour code command #253

Open
classabbyamp opened this issue Sep 27, 2020 · 1 comment
Open

resistor/inductor/cap colour code command #253

classabbyamp opened this issue Sep 27, 2020 · 1 comment
Labels
enhancement New feature or request priority-low This issue can be worked on later

Comments

@classabbyamp
Copy link
Member

Describe the solution you'd like
give the command either colour bands or a value and have it return the value or colour bands

Additional context
suggest different commands for R/L/C but they could be based on the same function

@classabbyamp classabbyamp added enhancement New feature or request priority-low This issue can be worked on later labels Sep 27, 2020
@classabbyamp
Copy link
Member Author

if we would like, it is easy to generate an image with something like this:

from PIL import Image

def genimage():
     im = Image.new(mode="RGB", size=(300, 100), color=(0xd2, 0xb4, 0x8c))
     im.paste((0xff, 0, 0), (25, 0, 50, 100))
     im.paste((0xff, 0, 0xff), (75, 0, 100, 100))
     im.paste((0xff, 0xff, 0), (125, 0, 150, 100))
     im.paste((0xff, 0xff, 0x88), (175, 0, 200, 100))
     im = im.convert("P", palette=Image.ADAPTIVE, colors=5)
     im.save("res.png", optimize=1)

To get something like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low This issue can be worked on later
Projects
None yet
Development

No branches or pull requests

1 participant