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

Feature request: adding helper method for converting ColorEvent to string and viceversa #333

Open
RezaRahmati opened this issue Jan 12, 2021 · 1 comment

Comments

@RezaRahmati
Copy link

Hi, first of all thank you for great work here.

I have a case that in admin panel I want to let user to choose the colors then store them in db, and later I will read from db and set some css variable at runtime.

The feature I am requesting is to add helper function or something to handle converting ColorEvent to string that can be stored and be used in frontend as valid color, (for example hsla(20, 50%, 100%, 0.5) ) and then converting back this string to HSLA | HSVA | RGBA | string that can be assigned to color input.

@scttcper
Copy link
Owner

You could use tinycolor, the color library this library uses https://github.com/scttcper/tinycolor#readme

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

2 participants