Color and UI
Streamline Design Tokens for Developers and Designers
Use this workflow to define, review, and ship reusable design tokens that connect designer decisions with code changes without extra interpretation steps.
The strongest design token practice is simple: define small, stable token sets early, keep semantic meaning in names, and stop adding new values until a real product need appears.
Core Workflow
Design tokens are not just a list of colors, spacing values, and font sizes. They are shared decisions that let a team build faster without breaking visual consistency. Start by linking each token to a user-visible behavior, not only to a raw number. If a value does not map to a repeatable UI rule, leave it as a local style in that component for now.
This page is best used as a practical, repeatable operating routine. It gives teams a single path from concept to implementation: discover repeated values, create semantic tokens, generate exports, verify behavior, then hand off with clear notes for future revisions.
System Setup Checks
Before you create your first token, run this setup check so the process does not stall later.
- Agree on the product scope, for example web, mobile web, or both.
- Confirm your style source, whether it is Figma, local CSS references, or existing component docs.
- Identify which platform outputs are required, such as design tool exports, style dictionaries, or plain CSS variables.
- Set review owners for design and code, and confirm a weekly rhythm for token changes.
If no owner and no cadence are set, pause token creation and define those process basics first. Without ownership, token edits become brittle and rarely auditable.
Token Discovery and Prioritization
Begin by extracting only the values that repeat across at least two components or at least two screens. This one rule creates immediate reuse while avoiding premature token inflation.
- Collect repeated values: Gather all repeated hex values, spacing metrics, radius values, and transition durations.
- Group by intent: Group values that represent the same meaning, such as primary background, warning color, or large container spacing.
- Measure usage frequency: Rank by how many screens and states each value appears in.
- Define a first version: Keep only the top layer of high confidence tokens and leave niche cases unchanged for now.
The decision should always move from high confidence to low confidence. If a value appears in only one context, do not force it into the token library during the first pass.
Naming Conventions That Scale
Bad names are the fastest path to token debt. Use a clear semantic structure and never encode raw color or size details first. The token name should describe purpose and state.
- Use role first, then scale, then state, for example
color.background.card.defaultorspacing.card.gap.lg. - Use one reserved bucket for semantic meaning and one bucket for primitives. Example:
color.red.500for primitive andfeedback.error.textfor semantic. - Document any abbreviations, and avoid mixing color names with intent names in the same token family.
- Keep naming order fixed across all categories so humans can search quickly.
Do not rename a token during implementation unless you also update the decision record and migration plan, even for minor punctuation changes.
Practical Build Steps
Use this standard sequence for every token release cycle.
- Prepare: Open the latest design source and list candidate values from current components.
- Draft: Create one semantic token set and one primitive set where needed. If no primitive is needed, skip it.
- Align: Run a 15 minute cross-check between designer and engineer using a single shared table.
- Export: Use converter output for baseline code artifacts only after the names and meanings are locked.
- Verify: Confirm no visual regressions through direct comparisons in target context.
- Hand off: Share tokens, diff summary, and migration impact before merge.
This sequence is intentionally short. The goal is not to automate everything in one pass. The goal is to make each pass deterministic and easy to repeat.
Decision Rules
- Create a token when the same value is used in at least two places and is likely to change together in the future.
- Skip a token when the value is unique, temporary, or tied to a single one-off screen.
- Choose semantic tokens for UI roles before visual primitives, so later color palette updates do not require changing consuming code.
- Use an emergency stop when a naming change breaks backward compatibility for existing components. Convert in two steps: deprecate, then replace.
- If a reviewer cannot explain why the token exists in 10 seconds, remove it and reintroduce it with clearer purpose.
Limits and Boundaries
To keep the token system manageable, enforce these limits per cycle:
- Max initial new tokens: 20 to 40 tokens per release, unless a migration plan exists.
- Scope expansion: no more than two design surfaces can be added in one pass unless approved by both design and dev leads.
- Legacy retention: keep deprecated tokens until all call sites are confirmed and tested.
- Accessibility: do not ship contrast-affecting color changes without a context check in UI states.
- File size: keep generated files easy to review; avoid giant export blobs without chunking by category.
A hard boundary is better than perfect ambition. Small, trusted batches reduce rework and make rollbacks predictable.
Validation Checklist Before Handoff
- Each token has a purpose statement and a documented owner.
- Token naming follows one convention across colors, spacing, typography, shadows, and radius.
- Raw value and semantic names are separated and mapped in a reviewable note.
- Exports build cleanly and match source meaning, not only source appearance.
- No unresolved references exist in styles that consume old names only.
- Deprecated tokens include end-of-life intent and replacement target.
Sign off only when the checker can confirm these lines without opening unrelated files.
Common Mistakes and Their Fixes
- Mistake: Tokenizing every measured value from a single mockup. Fix: Restrict to repeatable and cross-context values.
- Mistake: Naming tokens by visual appearance only. Fix: Rename with role intent, such as
status.success.background. - Mistake: Renaming tokens during implementation and shipping both old and new names. Fix: Use a deprecation window and migration notes.
- Mistake: Ignoring the converter output as a reference only. Fix: Treat output as mechanical and validate against intended semantics.
- Mistake: Missing a handoff note, which forces the next person to infer intent. Fix: Add purpose, owner, and migration entry for each update.
Stop Conditions
Stop the workflow when all of these are true:
- The token purpose is clear and aligned between design and development.
- The conversion output has been checked against visual context.
- Migration impact and ownership are documented.
- No unresolved reviewer questions remain on naming, usage scope, or fallback behavior.
If any condition fails, continue with a focused repair cycle rather than adding more token variants. A controlled pause is usually faster than another broad edit pass.
Related Tool Handoff
Use Design Token Converter after the naming set and semantic mapping are locked. The converter should be used as a deterministic export step, not as a decision engine.
- Export only after the final review pass in design.
- Store source references, exported files, and decision notes together.
- Attach a short risk note: what changed, what might break, and what to monitor after rollout.
If deployment is blocked by a dependency or build rule, hand off the package directly to the next owner with one clear request: update ownership comments first, then replace exports.
Operational FAQ
Do we need a full token library at project start?
No. Start with a minimal set for repeatable values, then expand only when repeated behavior appears. This keeps review fast and prevents unused tokens.
How often should tokens be revised?
Revise in planned batches linked to component releases. Frequent ad hoc updates should be avoided because they increase merge conflicts and review overhead.
What is the clean fallback for one-off values?
Keep them local in component styles until they repeat. Promote only after proving repeatable use.
When do we deprecate old tokens?
After replacement is complete and reviewed in at least one staging cycle with no unresolved blockers.