missive / emoji-mart

🏪 One component to pick them all
https://missiveapp.com/open/emoji-mart
MIT License
8.59k stars 828 forks source link

--rgb-background expects rgb values, there is no option to use hex colors etc. #803

Open btmnk opened 1 year ago

btmnk commented 1 year ago

To override the background color of the component to fit my custom theme I have only the option to pass rgb values as css vars. In my theme I only use hex colors however so I would need to add the colors here manually as rgb values.

I think it would be a lot easier to customize if we can have a --background-color css var that doesn't force us to use rgb. The #root style would just be background-color: var(--em-rgb-background); and the --em-rgb-background var(--rgb-background, rgb(21, 22, 23));.

This would allow us to use anything we want to override it. I would also propose to do this with every other css var if possible.

If there is nothing to be said against it I would be willing to try and create a PR for it.