---
title: "Unlocking inclusive design: how Primer’s color system is making GitHub.com more inclusive"
description: "GitHub's Primer design system fixed hundreds of color contrast violations across light and dark modes and all themes by changing its foundational color tokens (Primer Primitives) rather than individual components."
url: "https://swe.quest/articles/unlocking-inclusive-design-how-primer-s-color-system-is-making-github-com-more-438d95888d234cb3"
canonical: "https://github.blog/engineering/user-experience/unlocking-inclusive-design-how-primers-color-system-is-making-github-com-more-inclusive/"
source: "GitHub Engineering"
published: "2023-05-11"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["accessibility","design-systems","ci-cd","frontend"]
---

# Unlocking inclusive design: how Primer’s color system is making GitHub.com more inclusive

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2023-05-11, 6 min read, Case study. Original: [https://github.blog/engineering/user-experience/unlocking-inclusive-design-how-primers-color-system-is-making-github-com-more-inclusive/](https://github.blog/engineering/user-experience/unlocking-inclusive-design-how-primers-color-system-is-making-github-com-more-inclusive/)

## Summary

GitHub's Primer design system fixed hundreds of color contrast violations across light and dark modes and all themes by changing its foundational color tokens (Primer Primitives) rather than individual components. The team audited 100+ text/background color pairs against WCAG ratios (4.5:1 and 3:1) and wrote a script that checks every pair across every theme. The script handles semi-transparent colors by first blending the background onto the page background, then blending the text onto that result. The check now runs as a GitHub Action on every Primer pull request, and the changes were rolled out to staff behind a feature flag before going live.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Accessibility](https://swe.quest/tags/accessibility.md) (Web & mobile)
- [Design systems](https://swe.quest/tags/design-systems.md) (Web & mobile)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- WCAG contrast ratios
- design tokens

## Keywords

Primer, Primer Primitives, WCAG, GitHub Actions, Figma

## Related posts

- [Continuous AI for accessibility: How GitHub transforms feedback into inclusion](https://swe.quest/articles/continuous-ai-for-accessibility-how-github-transforms-feedback-into-inclusion-c36ff177f3a2d142.md): GitHub Engineering · 2026-03-12 · Medium · 14 min read · Accessibility, AI agents, LLMs, CI/CD
  GitHub built an event-driven accessibility feedback pipeline on GitHub Actions, Copilot and the GitHub Models API that turns every user report into a tracked, prioritized issue.
- [Design system annotations, part 2: Advanced methods of annotating components](https://swe.quest/articles/design-system-annotations-part-2-advanced-methods-of-annotating-components-10641335427d3115.md): GitHub Engineering · 2025-05-09 · Medium · 9 min read · Design systems, Accessibility, Frontend
  Design system teams can build their own "Preset annotations": Figma annotation components that carry accessibility details not conveyed visually, in component properties, or in code.
- [Illuminating dark mode](https://swe.quest/articles/illuminating-dark-mode-f998d746316f5fd8.md): Figma · 2022-07-21 · Medium · 15 min read · Design systems, CSS, Frontend, Refactoring & migrations, Accessibility
  Figma built dark mode by replacing roughly 5,100 build-time PostCSS color variables with runtime CSS custom properties based on a semantic token schema (Type | UI Element | Color role | Prominence | Interaction), so new themes only require reassigning token values.
- [How AI Assistants Can Decode GitHub Repos for UI Writers](https://swe.quest/articles/how-ai-assistants-can-decode-github-repos-for-ui-writers-bed232efc1e6b9e6.md): Docker · 2024-12-16 · Medium · 9 min read · AI agents, LLMs, Code review, Frontend
  An LLM agent can reliably flag user-facing copy changes in a branch when it is given narrow tools and expert hints about what "user-facing" means.
- [Building a more accessible GitHub CLI](https://swe.quest/articles/building-a-more-accessible-github-cli-b16ba0e7481d923f.md): GitHub Engineering · 2025-05-02 · Easy · 6 min read · Accessibility, Developer tools
  GitHub CLI's Public Preview (v2.72.0, enabled via \`gh a11y\`) adapts accessibility practice to the terminal, where no WCAG-equivalent standard exists and screen readers must infer structure from a plain character grid.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
