radix-ui / colors

A gorgeous, accessible color system.
https://www.radix-ui.com/colors
MIT License
1.38k stars 62 forks source link

How to use a color statically, not affected by theme? #11

Open pacocoursey opened 3 years ago

pacocoursey commented 3 years ago

I have a UI in which the toggle thumb should remain white on both light and dark mode:

basics paco sh_ basics paco sh_ (1)

This doesn't seem possible with Radix Colors without manually defining a new variable --white: <hardcoded radix color value>. Is this the recommended way? Is adding an escape hatch for using a static non-theme dependent color a feature that you would consider supporting?

colmtuite commented 3 years ago

What's wrong with simply defining backgroundColor: white? That's the approach we take.

brandongit2 commented 2 years ago

I second this issue. I like to sometimes mix light and dark themes, which is hard to do with the way Radix Colors segregates light and dark themes. It's also hard to work with CSS' prefers-color-scheme when using the CSS files provided by Radix Colors.