
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:
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:
Foreground (
fg-) – Text and icon colors.Background (
bg-) – Surface colors.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-primaryis a neutral background that allows anyfg-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-basemust 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-darkfor dark mode backgrounds)Neutral (e.g.,
fg-on-neutralfor grayish backgrounds)Light (e.g.,
fg-on-lightfor 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-primaryExtending 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.

Why should the company selling you intelligence also have exclusive control over the evidence that tells you what kind of intelligence you bought?

Why Local Food Is the Foundation

The Economics of Eating

We Didn’t Lose Community. We Lost the Economic Reason for Community

South Africa Exports More Than Minerals

Spec-First Design: Building MVPs with AI Instead of Figma

Unlocking Sustainable Growth Through Effective Business Systems

An Unfinished System: Notes on Family, Error, and How Things Stay Alive

Starting From Zero: The Budget Reset South Africa Probably Needs

Learning, Trauma, and Systems: Notes from an African Mind Exploring the Baldwin Effect

