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

Unable to use rgba colors in swatches #488

Closed
kriscarle opened this issue Mar 14, 2018 · 3 comments · Fixed by #688
Closed

Unable to use rgba colors in swatches #488

kriscarle opened this issue Mar 14, 2018 · 3 comments · Fixed by #688

Comments

@kriscarle
Copy link
Contributor

As of 2.14.0, swatches will only accept hex values, while previously it worked with any valid value recognized by TinyColor including rbga. This appears to be introduced by #461

My app uses transparency by default and I want the palette to appear the same as what is the user sees after the selection.

Would it work to switch components without a manual hex input back to just tinycolor(color).isValid()?

@casesandberg
Copy link
Owner

Ah, that makes sense. Mind putting up a PR that reverts that change?

@glenselle
Copy link

glenselle commented Aug 13, 2019

We're hitting this issue too. We'd love to have a transparent option in our UI but the change event won't fire. If the change in #461 is reverted the current logic will cause the bug in #432 to resurface. It sounds like the solution is to support hex8 which would allow for an alpha value per the comment here #432 (comment) by @elvisvoer

@kriscarle You mentioned working on a PR -- were you planning to add hex8 support?

As long as supporting hex8 is not a massive change I'd be willing to work on a PR for this.

@tamias
Copy link

tamias commented Oct 28, 2019

I've also just encountered this issue. I wanted to pass 'transparent' as a color to the Swatches component; the swatch is correctly rendered as a checkerboard, but the change event doesn't fire.

Should passing 'transparent' work, and if so, what arguments should be passed to the change event?

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

Successfully merging a pull request may close this issue.

4 participants