brattonross / windy-radix-palette

Bring Radix Colors to Tailwind CSS
https://windy-radix-palette.vercel.app
MIT License
237 stars 9 forks source link

Background Opacity #1

Closed nicknikolov closed 2 years ago

nicknikolov commented 2 years ago

Tailwind has syntax for adding background opacity like this bg-red-500/50. Doesn't seem to work with Radix generated classes. Is there a way to enable it?

brattonross commented 2 years ago

Hey, this was an intentional choice, as the color scales from Radix are not intended to be customized. Doing so risks you using a combination of colors that does not pass WCAG contrast ratio tests.

If you are looking to do something like blend a UI component into a colored background, then you can do this using the transparent variants of the colors.

Otherwise I'm afraid that I don't intend on supporting this, as I would like to stick to offering colors that have been purposely designed to pass WCAG tests. Thanks for the interest though!