Building a Scalable & Accessible Design System

A design system’s strength lies in its token structure.

Category:

Design

Design Systems

UI/UX Design

Pro Tips

Date:

21

21

/

Thursday, October 2, 2025

2

2

/

Thursday, October 2, 2025

2025

2025

Author:

Introduction

A well-structured design system is essential for maintaining consistency, scalability, and accessibility across digital products. This article explores the principles behind a structured approach to color tokenization, ensuring seamless adaptation across multiple brands while maintaining a strong visual hierarchy.

Token Structure: A Foundation for Consistency

A design system’s strength lies in its token structure. The system is divided into three domains:

  1. Foreground (fg-) – Text and icon colors.

  2. Background (bg-) – Surface colors.

  3. Border (border-) – Stroke colors.

To maintain consistency, tokens are further categorized into primitive and semantic tokens:

  • Primitive Tokens (default_brand.json): These contain raw RGBA values and serve as the foundation.

  • Semantic Tokens (default_theme.json): These reference primitive tokens and provide contextual meaning in the UI.

When switching brands, the corresponding JSON files must be updated to reflect the correct brand colors

Foreground & Background Relationships

A structured approach to foreground and background tokens ensures readability and accessibility.

General Backgrounds

(bg-primary)

  • bg-primary is a neutral background that allows any fg- token to be used freely.

  • However, fg-on- tokens should not be applied freely, as they are reserved for enforcing contrast on specific backgrounds.

Brand-Specific Backgrounds

(bg-brand-primary-solid-base)

  • Brand-specific backgrounds require carefully selected foregrounds.

  • fg-on-brand-primary-solid-base must be used to ensure sufficient readability and accessibility.

Enforcing Contrast with fg-on- Tokens

The fg-on- rule applies when strict contrast is necessary, ensuring accessibility compliance.

The rule applies to specific roles:

  • Brand (e.g., fg-on-brand-primary-solid-base)

  • Feedback Colors (Warning, Danger, Info, Success)

  • Dark (e.g., fg-on-dark for dark mode backgrounds)

  • Neutral (e.g., fg-on-neutral for grayish backgrounds)

  • Light (e.g., fg-on-light for very bright backgrounds)

Example: fg-on-quinary is required whenever bg-quinary is applied to maintain legibility.

Scaling the System: Primary, Secondary, and Tertiary Structure

To create a scalable and structured token system, a primary, secondary, and tertiary pattern is used:

  • System-Level Tokens: bg-primary, border-primary, fg-primary

  • Extending to Brands: Brands with tertiary colors can adopt this pattern (e.g., bg-brand-tertiary).

  • This approach ensures consistency across all brands, making it easier to introduce new themes.

Practical Implementation: Button Styling

Token Type General Button Brand-Specific Button Background bg-primary bg-brand-primary-solid-base Foreground Any fg- token fg-on-brand-primary-solid-base Border border-primary border-brand-primary-solid-base

This structure ensures that design tokens remain adaptable and accessible across different UI elements.

Why This Approach Avoids Component Tokens

A major advantage of this approach is that it eliminates the need for component-specific tokens. Instead of defining colors at the component level, the system remains flexible by using semantic tokens that adapt across multiple components. This reduces redundancy and makes it easier to maintain a unified visual language without inflating the design system with unnecessary component-level overrides.

By structuring colors around foreground, background, and border tokens with role-based contrast handling (fg-on-), UI elements can inherit styles dynamically without requiring component-specific mappings. This results in a lighter, more maintainable design system that scales effortlessly across different interfaces.

Conclusion

By implementing a structured color token system, this design system guarantees consistency, scalability, and accessibility across multiple brands. Using well-defined foreground, background, and border relationships, along with a strict contrast system (fg-on- roles), ensures a cohesive and readable UI. The primary, secondary, and tertiary structure further allows for easy expansion as new brand themes emerge.

With this foundation, the design system is built to scale while maintaining strong visual and accessibility principles.

So

Made with ❤ by GS

GENERATIVESTUDIO (PTY) LTD

Create a free website with Framer, the website builder loved by startups, designers and agencies.