-
Notifications
You must be signed in to change notification settings - Fork 356
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)
)but because
data
is still a string,var alpha = data && data.a;
will beundefined
and_colorChange
is settingcolor.setAlpha(alpha || 1);
:expected behavior:
when setting
"rgba(0, 128, 0, 0.57)"
(string), it should workcurrent behavior:
it will be parsed correctly, but the alpha will be overwritten to 1 - we lose the alpha component
The text was updated successfully, but these errors were encountered: