Building a Semantic Color System for Wayfair's Design System, Homebase.

A request to change the primary brand color for a subset of themes supported by the design system led us to improve our entire color system by establishing semantic color variables.

An icon of the Wayfair pinwheel.
Wayfair / Homebase Design System
An icon of a computer and phone signifying platforms.
Web, iOS, Android
An icon featuring people.
Product Design Lead
A diagram showing that hex colors map to base tokens which map to one semantic color variables that outputs themed components for Wayfair and Perigold brands.

Results

  • 50% projected efficiency gain for updating themes via semantic variables and shared tokens repo

  • 100% of components utilize shared semantic variables across Figma, Web, iOS, Android, and Icon Libraries.

  • 3+ improved themes by resolving theme exceptions (tech debt) for luxury and speciality retail brands

  • 1 new theme

  • Ready to support Dark Mode and Inverted UI

Impact

Before: 678 total updates required.
Before semantic variables it would be a significant effort to update the primary brand color across all components.

  • 172 web component instances

  • 334 iOS + Android component instances

  • 339 Figma component instances

After: 12 total updates required.
After semantic variables the design system could support this change at less than 2% of the effort previously required.

Design Tokens + Themes

Homebase, Wayfair's Design System, encompasses 8 distinct themes for web, iOS, and Android component libraries. Each theme comprises a collection of design tokens, which are variable sets applied to design system components. Design tokens serve as the foundational elements of the design system and are universally applied across all platforms to ensure brand and design uniformity.

A chart of Wayfair and Perigolds core color scale mapping hex values to base tokens.

These themes serve as a means to tailor component styles to match the unique aesthetic of different brands underneath the Wayfair umbrella. Theme architecture comprises a set of guidelines and principles that dictate how tokens are utilized throughout the entire system. For example, $core-color--60 is the background color for buttons. A simple request to change the primary brand color to $core-color--80 for a subset of themes for specialty and luxury retail brands led us to improve our entire color system.

A gif showing that the token $core-color--60 maps to a different hex value for each brand within Wayfair's umbrella of brands.

The Problem

We were not maximizing the potential of our design system. Themes were too rigid for specialty and luxury retail stores, making it difficult for them to differentiate their brand identity from Wayfair.

The Solution

Implement semantic variables into the token system to support scalable brand differentiation across all platforms using a shared token repository and to improve the usability of the design system.

A diagram showing that hex colors map to base tokens which map to one semantic color variables that outputs themed components for Wayfair and Perigold brands.

Semantic Variables

While base tokens are primitive values in our system and use context-agnostic naming (e.g. $core-color--60),  ​semanitc variables are an additional token layer on top of base design tokens applied to components which communicate an intended purpose and reference the context within the token name (e.g. $backgroundPrimaryIdle). Semantic variables serve as aliases for foundational tokens and should be characterized by clarity, meaning, and descriptiveness to effectively convey the corresponding design value.

Benefits of Semantic Variables

Semantic color variables and the use of a shared token repository for web and app helps create stronger brands by weaving brand identity throughout our digital products (across platforms) in a consistent, meaningful, and maintainable way.

  • Hosted in the shared token repository for both web and app engineering to pull from as one source of truth

  • Enables consistent color application across web and app components in code and design asset

  • Drives cost efficiency when making large-scale color updates

  • Allows for more theme differentiation to meet aesthetic brand needs

  • Supports a more consistent user experience

  • Sets up a framework to expand semantic variables to other token categories (e.g. density, spacing)

  • Unlocks future enhancements to support inverted UI and dark mode

Roadmap Commitment

Short Term Fix: Homebase implemented theme exceptions to override styles for the button component on AllModern, Joss & Main, and Perigold to support rebranding efforts. This was a short term fix that worked for a moment but created inconsistent color application throughout components.​

A diagram illustrating how Homebase created a theme override to apply $core-color--80 to the button component.

Desired Outcome: Semantic variables were added as a high-priority roadmap initiative. Implementation of semantic variables would eliminate need to create theme exceptions and would also result in the ability to systematically change primary brand color for all applicable components.

A diagram illustrating how applying one semantic color mapping to the desired base token can be applied to all components.

The Team

  • Karlee (me!)
    Product Design Lead

  • Blair
    Creative Technologist

  • Rogin
    Web Tech Lead

  • Anders
    iOS Tech Lead

  • Chris
    Android Tech Lead

Highlight of the Design Process

Discovery

  • Evaluated change proposals

  • Stakeholder interviews

Definition

Design

Delivery

The Work

Audit Design Tokens + Usage

An audit of existing design tokens was conducted to assess their application across web and app platforms, revealing insights that informed the semantic variable token taxonomy and unveiled color usage disparities among components and platforms.

  • Evaluated by an Airtable Audit the current color tokens in the web system and legacy semantic variables in the app system to identify opportunity areas within the 8 themes that Homebase supports.

  • Reviewed submitted community proposals regarding color changes and stakeholder interviews to learn the current pain points and needs for color flexibility.

  • Investigated and determined how Figma Tokens Studio would support semantic variables and theming.

A screenshot of an airtable audit showing what base tokens are mapped to components and their variants.

Identified Opportunities

01.

Documenting color usage with semantic variables is essential to solidify detailed design choices and ensure the accessibility of our design system.

02.

Establish design consistency across platforms through the utilization of shared design tokens.

03.

Minimize the effort required to update themes by systemically making updates in a centralized place where changes automatically flow to all relevant areas.

Workshop of Token Taxonomy

I facilitated a workshop with 18+ collaborators representing design and engineering across all platforms to review proposed token taxonomy to progress this project forward by updating the team on process and getting everyone together to make decisions together.

A collection of images showing a workshop that was conducted in Miro gathering insights from the team on semantic taxonomy.

Workshop Outcomes

The workshop lead to developing a semantic variable naming structure, a list of new variables and definitions, and each variable’s base token mapping per theme.

The recipe for how semantic variables are named.A screenshot of an airtable that shows all of the semantic variables, their definitions, and what base token they map to for all of the themes within the Homebase Design System.

Prototype Variables in Figma

At the time of this project, Figma did not have native support for variables. I coordinated a spike with engineering to investigate Tokens Studio to support semantic variables in Figma. The investigation was successful (pictured!) and we were able to use Tokens Studio to document semantic tokens and apply them to components in our libraries.

A collection of images showing how tokens were loaded into Figma Tokens Studio and a screenshot of a Google Meet testing out loading and theming the tokens on components.

Apply Semantic Colors to Component Catalog

To assist the design and engineering team in applying semantic color variables to components, I created a migration guide that mapped current assigned color usage on all components across web and app libraries to new semantic color variables.

The Airtable guide allowed me to delegate Figma library implementation across the entire Homebase XD team giving all designers hands on experience working with semantic color variables to build shared knowledge of our design system.

An airtable describing what semantic variables are assigned to what components and their variants.
A button and the semantic color variables assigned to it.

An Unthemed Button: Semantic color variables mapped on a button component  from the Web Component Library.

Buttons themed showing updated semantic color variables map to the correct base tokens.

Themed Buttons: Shows the semantic variable taxonomy stays the same but the swatch each theme maps to updates to the correctly mapped base token that's assigned in Tokens Studio.

Implement Across Figma, Code + Doc Site

A screenshot of the Homebase documentation site that details out semantic colors.

Results and Impact Recap

Results

  • 50% projected efficiency gain for updating themes via semantic variables and shared tokens repo

  • 100% of components utilize shared semantic variables across Figma, Web, iOS, Android, and Icon Libraries.

  • 3+ improved themes by resolving theme exceptions (tech debt) for luxury and speciality retail brands

  • 1 new theme

  • Ready to support Dark Mode and Inverted UI

Impact

Before: 678 total updates required.
Before semantic variables it would be a significant effort to update the primary brand color across all components.

  • 172 web component instances

  • 334 iOS + Android component instances

  • 339 Figma component instances

After: 12 total updates required.
After semantic variables the design system could support this change at less than 2% of the effort previously required.

Let's Keep Going

Thanks for checking out my work and getting to know me.