# Color in Design Systems: Shared Palettes, Roles, and Readable Text

> Learn how a design system builds one shared palette, names colors by their job, and keeps text and controls readable in every theme.

**In short:** Color in a design system means one shared palette, with colors named by their job, so text and controls stay readable in every theme.

From "Design systems", a free course by Venkat R. Murty: https://designervenkat.online/learn/design-systems/color

## What you will learn

Color is one of the first things people notice in a product. In a design system, color is a shared palette plus rules that say which color to use, and when. This lesson shows how a palette is built, why colors are sorted by purpose, how to check that text stays readable, and how to apply color to states, surfaces, and themes. Other lessons cover typography, spacing, and how color values are stored.

- **Palette:** The full set of colors a design system allows. If a color is not in the palette, designers should not use it.
- **Hue:** The basic family of a color, such as blue, red, or green.
- **Tint:** A hue mixed toward white, so it looks lighter.
- **Shade:** A hue mixed toward black, so it looks darker.
- **Role:** The job a color does, such as main action or error. Roles are named by purpose, not by appearance.
- **Contrast ratio:** A number that compares how light or dark two colors are next to each other. A higher number means text is easier to read.
- **WCAG:** The Web Content Accessibility Guidelines, a standard for making digital content usable by more people, including people with low vision.
- **Theme:** A complete set of color choices for one mode, such as light mode or dark mode.
- **Accent:** A color used on purpose and in small amounts to draw attention.
- **State:** How a control looks in a given situation, such as when a mouse hovers over it, when it has keyboard focus, or when it is disabled.

## Why does one shared palette matter?

Without rules, every designer picks their own blue. After a few months a product may have five blues that look almost the same, and nobody knows which one is the real brand blue. A shared palette stops that drift. Each color is chosen once, checked once, and reused everywhere.

- **One source for every screen:** The login page and the settings page draw from the same palette, so their buttons match.
- **Meaning stays stable:** When colors are sorted by purpose, the error red always means a problem. Users learn the meaning once.
- **Fewer risky guesses:** Pairs that were tested in the palette are less likely to be used in a low-contrast combination later.

## What is the base palette?

A base palette starts with a few key colors. Each key color then gets a run of lighter and darker versions. Google's Material Design 3 works this way. The smaller the number, the darker the color.

You do not need all five to start. Many products begin with a brand color, a set of neutrals for backgrounds and text, and a few status colors. Keep the first palette small, because each extra color adds more pairs that must be checked.

> **Tip:** Start with the brand color, then build neutrals around it. Grays and near-whites do most of the work on screens, so they deserve as much care as the brand hue.

Shades and tints give a team room to choose a color that is dark enough for text or light enough for a background. One design guide notes that bright colors often need darker shades before they are readable as text. Test every shade on real components, not only on a swatch. A color can look fine in a chart and still fail on a card with small text.

## What are color roles?

A role names the job a color does. Designers ask, 'What is this for?' before they ask, 'Which color looks right?' The six roles below are common in design systems, and most teams use these names or close versions of them.

- **Primary:** The brand's main color. It marks the most important action, such as a main button or an active link.
- **Neutral:** Grays, whites, and near-blacks. Neutrals cover page backgrounds, cards, borders, and most body text.
- **Success:** Shows that an action worked, such as a saved form or a completed payment.
- **Warning:** Signals a risk or a need for attention, such as a password that is about to expire.
- **Error:** Marks a real problem or a destructive step. Keep error colors for real errors, so users can trust them.
- **Info:** Shares neutral news or a helpful hint, such as a tip about a new feature.

Roles keep teams honest. If someone wants a red banner for a promotion, the role system asks whether a promotion is an error. It is not, so the team picks a different role.

> **Tip:** Write the purpose of each role in one sentence. If you cannot write that sentence, the role is probably not needed.

### How do roles connect to the palette?

A role is a pointer to a color in the palette. In Material Design 3, primary roles are picked from the primary tonal palette, and surface roles are picked from the neutral palette. The designer chooses the role, and the system supplies the exact tone.

Many roles come in pairs. A role such as 'on-primary' is the color for text or icons that sit on a primary-colored area. Material says its 'on' colors are designed to contrast with the color beneath them. The name tells the next designer what must sit on what.

## Worked example: Material Design 3

Google's Material Design 3 is a public, detailed color system, so it is a good real example. The steps show how one brand color becomes buttons, text, and alerts that stay readable in light and dark themes. Use it to learn the logic, not to copy its exact values.

1. **Start with one key color:** The team picks one main brand color. Material calls this the key color, and it is the basis for the tonal palette built next.
2. **Generate a tonal palette:** The system builds 13 tones from that key color, from very dark (0) to very light (100). The tones stay matched in hue and chroma, so they feel like one family.
3. **Assign roles on the screen:** A main button gets the primary role. Its label uses 'on-primary', the paired role for text on primary. An error message gets the error role, and its text uses the matching 'on' role.
4. **Switch to dark theme:** Material defines a complete set of roles for dark theme, built from the same tonal palettes. The button still has a readable label, because its label uses its own paired role in the dark set too.

The lesson is the pattern, not the numbers. One seed color produces a family of tones. Roles pick tones by job. Each 'on' role is paired with the color it sits on, and the same roles then work in a second theme.

> **Tip:** When you study a real system, trace one button through every step. Ask which role it uses, which role its text uses, and what changes in dark mode.

## How readable must text be?

Contrast is the difference in lightness between text and the color behind it. Low contrast makes text hard to read for many people, including people with low vision, people with color blindness, and anyone reading in bright sunlight. WCAG sets minimum contrast ratios that many laws and buying rules point to.

At WCAG's AA level, the usual target, normal text needs a 4.5:1 ratio and large text needs 3:1. The stricter AAA level asks for 7:1 for normal text. Most teams aim for AA.

A common example shows the problem. Light grey text, #CCCCCC, on a white background measures about 1.6:1. That is far below the 3:1 minimum, even for large text.

### What contrast numbers should you remember?

- **Normal text: 4.5:1:** Normal text is anything below 18pt, or below 14pt when bold. Body copy, labels, and small hints fall here.
- **Large text: 3:1:** Large text is 18pt and up, or 14pt bold and up. A big heading can pass at 3:1 where the same color on body text would fail.
- **Parts of the interface: 3:1:** Borders, icons, focus rings, and other control parts need 3:1 against the colors next to them, so users can see where the control is.

Some things are exempt. Logos and purely decorative text do not have to meet the text rules. Placeholder text is not exempt, so it should meet 4.5:1. Disabled controls are often exempt, but people still need to read them.

> **Tip:** Check the pair, not the single color. The text color, the background, and the text size work together. The same grey can pass on one background and fail on another.

## Never use color alone

Section 508 guidance says content should have a visual mode that does not require color perception. A red border with no words or icon fails this rule for someone who cannot see red well.

- **Text labels:** Write 'Error: email is missing' instead of only turning the field red. The words carry the meaning.
- **Icons:** Add a warning triangle to a warning, or a check mark to a success message. The shape tells users what happened.
- **Shape or underline:** Underline links, or use a different border style for a selected item. Links inside body text need a non-color cue as well as a clear color difference.

Charts follow the same rule. If two data lines differ only by color, add a pattern or a label so readers can still follow each line.

## Applying color to states, surfaces, and text

Once the palette and roles exist, the job is to apply them. Most screens use neutral roles for the background and text, a primary role for the main action, and a few status roles. The rest of the palette stays out of the way.

Text roles give body copy a steady, readable color. Surface roles give cards and panels a background that sets them apart from the page. Because surfaces are chosen by role, a team can change the page background without repainting every card.

### States: hover, focus, and disabled

A state is a visible change that tells a user what a control is doing. Color often carries these changes, but each change must still meet the contrast rules and must not be the only cue.

- **Hover:** Shift the same role a small step toward a darker or lighter tone. The button still looks like the same button, only a little more active.
- **Focus:** Show a clear focus ring for people who use a keyboard. The ring needs 3:1 against the colors around it.
- **Disabled:** Make the control look quieter, but keep the label readable. Users should still see what the control says, even if they cannot use it.

> **Tip:** Test each state on its own. A hover color that looks good may fail once it sits behind the label, and a focus ring that disappears on a dark card is not doing its job.

### Surfaces and text pairs

A surface is the background of a part of the screen, such as a page, a card, or a sheet that slides up. Text on a surface should use a text role designed for that surface. A text role that works on white may fail on a light grey card.

Keep a short list of approved pairs, such as 'body text on page background' or 'label on primary button'. Anyone building a new screen can check their pair against the list first.

## How do light and dark themes work?

A theme is a complete set of color roles for one mode. Light mode and dark mode are the two most common. A good system keeps the same role names in both themes and changes only the values behind them.

Dark mode is not a simple inversion. Flipping black and white can make a dark surface lose its edge against the page, or make bright accents glow too hard.

> **Tip:** Test every important role pair in both themes. A pair that passes in light mode can fail in dark mode.

## Using accents with restraint

An accent is a color used to draw attention. In Material Design 3, the secondary color is used for accents, and the tertiary color is less common. Both are used more sparingly than primary.

Accents work only when they are rare. If five elements all shout in a bright color, none of them stands out. Give each accent one clear job, and write that job in the roles list.

> **Tip:** If a second accent appears on a screen, ask what it means. If the answer is 'it looks nice', remove it or give it a role.

## Check your color work

1. **List the roles:** Confirm that each color has a role such as primary, neutral, success, warning, error, or info. Remove any color that has no job.
2. **Test text pairs:** Check normal text at 4.5:1 and large text at 3:1. Use a contrast checker, and test the real text size.
3. **Test interface parts:** Check borders, icons, and focus rings at 3:1 against the colors next to them.
4. **Remove color-only meaning:** For every status, add a word or an icon so the meaning survives for someone who cannot see the color.
5. **Test states and both themes:** Check hover, focus, disabled, light mode, and dark mode. A color blindness simulator can show the screen the way other people see it.

## Quick check

Try these short scenarios. Each one needs the ideas in this lesson to answer.

**Quick check:** Your app shows a 'Saved' message in green and a 'Failed to save' message in red. Both are small lines of text. The failed text is light red on white. A teammate suggests the two states differ only by green versus red. What two problems should you check?

A. The palette has too few hues, so add a third color for errors and change the font size of both messages.
B. The light red text may fail the 4.5:1 text contrast rule, and the states rely on color alone, so each message needs a word or an icon.
C. Only the success message needs changes, so add a shadow behind its text and keep the error message as it is.
D. The messages are too long, so shorten them and use a bolder weight for both states.

**Answer:** B. Two rules apply. The light red text may be too close in lightness to white, which is a contrast problem. Differing only by color breaks the Use of Color rule, so each message needs a second cue.

**Quick check:** A product has a blue primary button with a white label in light mode. In dark mode, the team copies the same blue and the same white label onto a dark page, and the label becomes hard to read. What is the best fix?

A. Keep the same values, because the pair was already tested in light mode.
B. Make the label smaller in dark mode so it sits more quietly on the button.
C. Give dark mode its own complete set of roles, and pair the button's label with an 'on' role tested against the dark-mode button color.
D. Remove the button from dark mode and use a plain text link in its place.

**Answer:** C. Each theme needs its own complete set of roles, and each label must be paired with the color beneath it in that theme. Testing only the light theme does not prove the dark theme is readable.

**Quick check:** A designer shows a disabled 'Submit' button with pale grey text on a pale grey background. The designer says disabled controls are exempt from contrast rules, so the text needs no checking. Which response is best?

A. The designer is right, because disabled controls never need a contrast check.
B. Disabled controls are often exempt, but users still need to read the label, so aim for at least 3:1 and keep the disabled look clear.
C. Disabled controls must meet the strict AAA level of 7:1 for normal text.
D. Disabled controls should use the error role so users know something went wrong.

**Answer:** B. The exemption lowers the rule but does not remove the need for a readable label. A sensible target is 3:1, and the disabled look should still be clear as a state.

## Sources

- [Material 3: How the color system works (Google)](https://m3.material.io/styles/color/system/how-the-system-works)
- [Material 3 glossary: key color, tonal palette, color scheme (Google)](https://m3.material.io/foundations/glossary?linkId=8230255)
- [Material Design 3 in Compose: color scheme and accessibility (Android Developers)](https://developer.android.com/develop/ui/compose/designsystems/material3)
- [Material 3 color system basics for Android developers (ProAndroidDev)](https://proandroiddev.com/material3-color-system-basics-for-android-developers-2b0c73a58b2d)
- [Material 3 color roles and tonal palettes overview (Medium, Zoe Wave)](https://zoewave.medium.com/material-3-design-system-e91a15d303a0)
- [Making Color Usage Accessible (Section508.gov)](https://www.section508.gov/create/making-color-usage-accessible/)
- [Understanding WCAG SC 1.4.3 Contrast Minimum (digitala11y)](https://www.digitala11y.com/understanding-sc-1-4-3-contrast-minimum/)
- [Color Contrast Requirements: WCAG Guide for Designers (TestParty)](https://testparty.ai/blog/color-contrast-requirements)
- [Colour Contrast Accessibility: WCAG Ratios and Fixes (Codexmotive)](https://codexmotive.com/insights/colour-contrast-accessibility)
- [WCAG 1.4.3 Contrast (Minimum) (WCAG Patterns)](https://wcagpatterns.com/wcag/contrast-minimum)
- [WCAG 2.2 Color Contrast guide (Web Accessibility Checker)](https://web-accessibility-checker.com/en/blog/color-contrast-checker-wcag-guide)
- [WCAG color contrast requirements, explained (wcagc)](https://wcagc.com/blog/color-contrast-requirements-explained)
- [Accessible Color Palette Guide (accessibility.build)](https://accessibility.build/guides/accessible-color-palettes)
- [Build a Better Accessibility Color Palette From Scratch (Webability)](https://www.webability.io/blog/accessibility-color-palette)
- [Creating a color palette for design systems, revised edition (Imperavi)](https://imperavi.com/blog/creating-a-color-palette-for-design-systems-revised-edition/)
- [Color Consistency in Design Systems (UXPin)](https://www.uxpin.com/studio/blog/color-consistency-design-systems/)
- [Color accessibility 101: Designing for color blindness (Adobe Express)](https://www.adobe.com/express/learn/blog/color-accessibility-guide)
- [Accessible Color Palettes (DevToolsHub)](https://devtoolshub.net/blog/accessible-color-palettes)
- [Creating a Color Palette for Your Design System (Figr)](https://figr.design/blog/creating-a-color-palette-for-your-design-system-practices-and-tips)
