Menu

Stop Hardcoding Color Variants. Relative Color Syntax Does It.
๐Ÿ“ฐ

Stop Hardcoding Color Variants. Relative Color Syntax Does It.

DEV Community: cssยทParsa Jยท16 days ago
#zwB6DdTV
#devtocss#devto#dev#brand#color
Reading 0:00
15s threshold

The PR comment was two words: "wrong blue." Not a bug report, not a reproduction โ€” a designer scrolling through a staging build, stopping on the "Upgrade" button's hover state, and flagging it because something about it felt off against the rest of the rebrand that had shipped two weeks earlier.

They were right, and it took longer than it should have to find out why. The button's resting color matched the new brand blue exactly โ€” that token had been updated the day the rebrand landed. Its hover color was still the old brand blue, darkened. Nobody had touched it, because nobody remembered it existed.

Five variables, one of which actually gets updated

Open almost any design system's color file and you'll find the same shape: one brand color, and a handful of hand-picked variants sitting next to it that all look derived but are actually just...โ€ฆ

Continue reading โ€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.