esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

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.

13 min readFree

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.

Key words

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. 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. 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. 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. 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. 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. 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. 3

    Test interface parts

    Check borders, icons, and focus rings at 3:1 against the colors next to them.

  4. 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. 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?

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?

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?

Sources

How is this lesson?

Last updated on 17 November 2026

Learn with me

Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.