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

alpha channel not working for me #17

Open
alejandroLoz opened this issue Nov 20, 2017 · 1 comment
Open

alpha channel not working for me #17

alejandroLoz opened this issue Nov 20, 2017 · 1 comment

Comments

@alejandroLoz
Copy link

I'm trying to transform the background into transparent but it's not working for me:
I've tried context.fillStyle = "rgba(0,0,0,0)"; but it fills the background with a non transparent color.

What should I do?

@alejandroLoz
Copy link
Author

Checking the code if found this:
color.a = Math.round((parseFloat(vals[3])||1.0)*255);
So in case of setting vals[3] = 0.0
parseFloat(vals[3])||1.0) returns 1 which turns the alpha value to 255.

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

No branches or pull requests

1 participant