Name color tokens so the system scales
A worked tutorial on token naming: role-based names, numbered scales, theme-proof conventions, and the names to never use.
Name roles, never appearances
text-primary survives a rebrand; dark-gray-800 does not. Every semantic token name should describe the job (background, surface, border, primary, danger, on-primary) so values can change underneath without renaming anything. Appearance names (light-blue, pale-green) are tech debt with a friendly face — the day the 'blue' becomes teal, every name lies.
Numbered scales are the exception that proves the rule: brand-50…950 describe positions in a ramp, which is structural, not decorative. Keep numbers for ramps, roles for everything built from them.
Build theme-proof conventions
Names must mean the same thing in both themes: surface is 'the card fill' in light and dark alike, even though the values invert. Never encode a theme in a name (dark-bg, light-text) — that strands every token in one mode and forces a parallel naming universe for the other.
State belongs in suffixes, not new names: action, action-hover, action-active, action-disabled read as one family with predictable physics. A developer who learns the suffix pattern can guess any token correctly, which is the real test of a naming system.
Retire names deliberately
Tokens accumulate: campaigns, experiments, and dead features leave orphans. Quarterly, grep usage and deprecate the unused — mark deprecated for one release with a pointer to the replacement, then delete. Deletion without deprecation breaks someone's screen; deprecation without deletion litters the system forever.
Cap the palette of roles, not just values: if the system has four blues doing one job, merge them and alias the old names during transition. Fewer roles, each with a documented reason to exist, is what 'scales' actually means.
Tip
If a token needs a comment explaining what it is for, the name failed. Rename it — comments on names are the system telling you it is confused.
Related free tools
Want to apply this right now? Open the color palette generator and try it with your own brand color — free, no sign-up.