ngx-color icon indicating copy to clipboard operation
ngx-color copied to clipboard

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

Open RezaRahmati opened this issue 4 years ago • 1 comments

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.

RezaRahmati avatar Jan 12 '21 02:01 RezaRahmati

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

scttcper avatar Jan 12 '21 18:01 scttcper