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

When using a RGBA string, the alpha is lost #68

Closed
304NotModified opened this issue May 31, 2017 · 0 comments · Fixed by #69
Closed

When using a RGBA string, the alpha is lost #68

304NotModified opened this issue May 31, 2017 · 0 comments · Fixed by #69

Comments

@304NotModified
Copy link
Contributor

304NotModified commented May 31, 2017

When setting the value "rgba(0, 128, 0, 0.57)" (so a string)

The value is parsed correctly to the tinyColor (inside _colorChange(data, oldHue))

image

but because data is still a string, var alpha = data && data.a; will be undefined and _colorChange is setting color.setAlpha(alpha || 1); :

image

expected behavior:

when setting "rgba(0, 128, 0, 0.57)" (string), it should work

current behavior:

it will be parsed correctly, but the alpha will be overwritten to 1 - we lose the alpha component

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 a pull request may close this issue.

1 participant