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

Adds option for SVG fill attribute #122

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ahoran3
Copy link

@ahoran3 ahoran3 commented Jan 15, 2021

Adds ability to set the fill color of your output png with a new fill option.

Usage for red output shape:

svg2png(sourceBuffer, { width: 300, height: 400, fill: '#ff0000' })
    .then(buffer => ...)
    .catch(e => console.error(e));

Includes updated documentation

@ahoran3
Copy link
Author

ahoran3 commented Jan 18, 2021

Hi @domenic! Thanks for the great library. I've added a small change to allow the user to also set the fill color. This is a missing piece I needed as I'm converting svg shapes to a client's primary color before saving images to use in their email correspondence templates.

If there's anything you need from me to help get this released, just @ahoran3 me!

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant