3 ms·
Fully agree with this, I think having color variables like blue-500, orange-100 is completely counter-productive. What's the point of color variables, if they
by aurbano 6y ago
Fully agree with this, I think having color variables like blue-500, orange-100 is completely counter-productive.
What's the point of color variables, if they just describe the color they are... We already have color names for that.
- trevyn 6y agoThe intention is that colors of the same number have a similar luminance, so you can easily adjust contrast and hue independently while designing. These schemes also keep a relatively consistent saturation profile across the palette. It's the kind of thing professional designers do intentionally, but set up in a system that makes it easier to get a "designed" look without much effort.
- deltron3030 6y agoThe numbers describe the brightness, they can be useful if they're linked to UI usecases and if you're ok with limiting yourself to a prebuild color palette. It's just that functional names (btn-fg, btn-bg etc.) are better imo because they separate concerns. You could link them to a grayscale when prototyping and then later switch the colors in the stylesheet. It's also slower if you have to think about picking colors when coding.
- dkersten 6y agoI thought this immediately too but tailwind does allow you to use generic names too: https://tailwindcss.com/docs/customizing-colors#naming-your-colors https://tailwindcss.com/docs/customizing-colors#naming-your-...