---
url: /styles/color/roles.md
description: >-
  There are 26 standard color roles organized into six groups: primary,
  secondary, tertiary, error, surface, and outline
---

# Color roles

There are 26 standard color roles organized into six groups: primary, secondary, tertiary, error, surface, and outline

![Color roles](/assets/c104f12e-mroe1r89-color.CNseQ7zK.webp)

## What are color roles?

Color roles are like the "numbers" in a paint-by-number canvas. They're the connective tissue between elements of the UI and what color goes where.

* **Color roles are mapped to Material Components**

  <br>

  You'll use these color roles whether you're using the static [baseline scheme](static/baseline.md "Baseline is the default static color scheme for Material products. It includes colors for both light and dark themes.") or [dynamic color](dynamic/choosing-a-source.md "Dynamic color takes a single color from a user's wallpaper or in-app content and creates an accessible color scheme assigned to elements in the UI."). If your product contains custom components, they'll need to be properly mapped to this set of color roles.
* **Color roles ensure accessibility**

  <br>

  The color system is built on [accessible color pairings](system/how-the-system-works.md#e1e92a3b-8702-46b6-8132-58321aa600bd "For example, a dark surface color is algorithmically paired with a light text label color so the UI automatically meets contrast requirements."). These color pairs provide an accessible minimum 3:1 contrast.
* **Color roles are tokenized**

  <br>

  Roles are implemented in design and code through tokens. A [design token](../../foundations/design-tokens/overview.md "Design tokens are the building blocks of all UI elements. The same tokens are used in designs, tools, and code.") represents a small, reusable design decision that’s part of a design system's visual style.

![Example color swatches for all 45 color roles including Primary, Secondary, Tertiary, Error, Surfaces, Inverse roles, Scrim and Shadow roles.](/assets/44a94cb6-ly2ms4t2-1.C-n9h5G1.webp)

Diagram of all Material color roles, including optional add-on roles for surface colors and fixed accent colors

<a id="19e75989-7485-4f5b-a769-940c4e4364bc"></a>

## General concepts

Here are helpful-to-know words you'll see in the names of color roles:

* **Surface&#xA0;**– A role used for backgrounds and large, low-emphasis areas of the screen.
* **Primary, Secondary, Tertiary** – Accent color roles used to emphasize or de-emphasize foreground elements.
* **Container** – Roles used as a fill color for foreground elements like buttons. They should not be used for text or icons.
* **On** – Roles starting with this term indicate a color for text or icons *on top* of its paired parent color. For example, **on primary** is used for text and icons against the **primary** fill color.
* **Variant** – Roles ending with this term offer a lower emphasis alternative to its non-variant pair. For example, **outline variant&#xA0;**&#x69;s a less emphasized version of the **outline&#xA0;**&#x63;olor.

### Pairing and layering colors

To ensure accessible visual contrast in your app, apply colors only in the intended pairs or layering orders described in the following sections.

Combining colors improperly may break contrast necessary for visual accessibility, particularly when colors are adjusted through [dynamic color](dynamic/choosing-a-source.md "Dynamic color takes a single color from a user's wallpaper or in-app content and creates an accessible color scheme assigned to elements in the UI.") features such as [user-controlled contrast](system/how-the-system-works.md#a360c176-b99e-4804-8034-9884833009c8 "User-controlled contrast is a dynamic color feature enabling users to choose from one of three levels of color contrast: standard, medium, and high.").

::: tip Do
![Pair of buttons shown at three different contrast levels. At every level, the text on the button is legible because the color roles are properly applied to the buttons.](/assets/9a14e425-ly2msstb-2.CbRmsHG0.webp)

Pair and layer color roles as intended to ensure expected visual results and accessibility. In this example, the two buttons mapped with (1) **primary**, (2) **on primary**, (3) **secondary container**, and (4) **on secondary container** stay legible as the contrast level changes.
:::

::: danger Don't
![Pair of buttons shown at 3 different contrast levels. The text on the button becomes illegible because the color roles are improperly applied to the buttons.](/assets/ddd96bcf-ly2mt0z5-3.FsnfMiJz.webp)

Improper color mappings can produce unintended visual results and break accessibility. In this example, the two buttons mapped with (1) **primary**, (2) **primary container**, (3) **secondary container**, and (4) **on surface** become illegible as the contrast level changes.
:::

## Accent color roles

Accent color roles include primary, secondary, and tertiary. Assign them to elements in the UI based on importance and needed emphasis. Use caution when changing color roles for visual effect.

* **Primary roles** are for important actions and elements needing the most emphasis, like a FAB to start a new message.
* **Secondary roles** are for elements that don’t need immediate attention and don’t need emphasis, like the selected state of a navigation icon or a dismissive button.
* **Tertiary roles&#x20;**&#x61;re for smaller elements that need special emphasis but don't require immediate attention, such as a badge or notification.

![A mail app showing a mix of primary, secondary, and tertiary accent colors used across the screen.](/assets/442c86cb-m7atpmau-04.BNEoNFij.webp)

1. Primary colors are used for the most important elements, like a starred message and FAB to start a new message
2. Tertiary colors are used for smaller emphasized elements, like a badge suggesting a follow up
3. Secondary colors are used for less urgent elements, like the background of an inactive star icon and the selection state of an inbox icon

## Primary

Use primary roles for the most prominent components across the UI, such as the FAB, high-emphasis buttons, and active states.

* **Primary:** High-emphasis fills, texts, and icons against surface

  <br>
* **On primary:** Text and icons against primary

  <br>
* **Primary container:** Standout fill color against surface, for key components like FAB

  <br>
* **On primary container:&#xA0;**&#x54;ext and icons against primary container

![4 color swatches: primary, on primary, primary container and on primary container.](/assets/8534ece0-ly2mtbil-4.CtBASngo.webp)

Primary color roles include **primary** and **primary container**, with their respective “On” colors

![Primary color used for filled button, and "on primary" color used for the text within that button.](/assets/260bdf5b-ly2muo2k-5.CSkzfQCM.webp)

1. On primary 
2. Primary

!["Primary container" color used for FAB and "on primary container" color used for the text and icon within.](/assets/34defa34-m2kwfth2-6.CbJNebA9.webp)

1. On primary container 
2. Primary container

## Secondary

Use secondary roles for less prominent components in the UI such as filter chips.

There are four secondary roles:

* **Secondary:** Less prominent fills, text, and icons against surface

  <br>
* **On secondary:** Text and icons against secondary

  <br>
* **Secondary container:** Less prominent fill color against surface, for recessive components like tonal buttons

  <br>
* **On secondary container:** Text and icons against secondary container

![4 color swatches: secondary, on secondary, secondary container, and on secondary container.](/assets/25279d4e-ly2mvccz-7.C2ZPX09J.webp)

Secondary color roles include **secondary** and **secondary container**, with their respective "On" colors

![An icon button using "secondary container" color, and an icon using "on secondary color."](/assets/b980b14f-ly2mvlj0-8.CSwN_BIq.webp)

1. Icon: On secondary container 
2. Button: Secondary container

## Tertiary

Use tertiary roles for contrasting accents that balance primary and secondary colors or bring heightened attention to an element such as an input field.

There are four tertiary roles:

* **Tertiary:** Complementary fills, text, and icons against surface

  <br>
* **On tertiary:** Text and icons against tertiary

  <br>
* **Tertiary container:** Complementary container color against surface, for components like input fields

  <br>
* **On tertiary container:&#xA0;**&#x54;ext and icons against tertiary container

![4 color swatches: tertiary, on tertiary, tertiary container, and on tertiary container.](/assets/11e8d457-ly2mzjt8-9.Dvb5Z0tv.webp)

Tertiary color roles include **tertiary** and **tertiary container**, with their respective "On" colors

The tertiary color roles can be applied at the designer's discretion. They're intended to support broader color expression.

![A selected element using Tertiary Container as a background color and On Tertiary Container for text.](/assets/3d7555f7-ly2n0pba-10.D6p2Cxqd.webp)

1. On tertiary container
2. Tertiary container

## Error

Use error roles to communicate error states, such as an incorrect password entered into a text field.

There are four error roles:

* **Error:** Attention-grabbing color against surface for fills, icons, and text, indicating urgency

  <br>
* **On error:** Text and icons against error

  <br>
* **Error container:** Attention-grabbing fill color against surface

  <br>
* **On error container:** Text and icons against error container

Error is an example of a static color (it doesn't change even in dynamic color schemes). Error color roles are made static by default with any dynamic color scheme. They still adapt to light and dark theme.

![4 color swatches: Error, On error, Error container and On error container roles.](/assets/717cfdff-ly2n10jv-11.G2JMPFB6.webp)

Error color roles include **error** and **error container** with their respective "On" colors.

<a id="89f972b1-e372-494c-aabc-69aea34ed591"></a>

## Surface

Use surface roles for more neutral backgrounds, and container colors for components like cards, sheets, and dialogs.

There are three surface roles:

* **Surface:&#xA0;**&#x44;efault color for backgrounds

  <br>
* **On surface:** Text and icons against any **surface** or **surface container&#xA0;**&#x63;olor

  <br>
* **On surface variant:** Lower-emphasis color for text and icons against any **surface** or **surface container** color

![3 color swatches: Surface, On surface and On surface variant.](/assets/30a85cbd-ly2n1cbu-12.xyYBRbL5.webp)

**Surface** and **on surface** roles in light theme

There are also five surface container roles named based on their level of emphasis:

* **Surface container lowest:** Lowest-emphasis container color

  <br>
* **Surface container low:** Low-emphasis container color

  <br>
* **Surface container:** Default container color

  <br>
* **Surface container high:** High-emphasis container color

  <br>
* **Surface container highest:** Highest-emphasis container color

**Surface container** is the default role, but the others are especially helpful for creating hierarchy and nested containers in [layouts for expanded screens](../../foundations/layout/breakpoints/expanded.md).

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fly2njabe-GM3-Styles-Color-Color_roles-1-v01.mp4?alt=media" aria-label="4 color swatches in light and dark theme: Surface container lowest, Surface container low, Surface container, Surface container high and Surface container highest."></video>

The five **surface container** roles, shown in light and dark theme

The most common combination of surface roles uses **surface** for a background area and **surface container** for a navigation area.

Text and icons typically use **on surface&#xA0;**&#x61;n&#x64;**&#xA0;on surface variant&#xA0;**&#x6F;n all types of surfaces.

![Email app using Surface for the main background color and Surface Container for the navigation bar background](/assets/be854b1e-ly2n20l4-14.646JgNy-.webp)

1. Surface
2. Surface container

All color mappings – but especially surface colors – should remain the same for layout regions across [breakpoints](../../foundations/layout/breakpoints/overview.md "Breakpoints are opinionated window sizes where a layout changes to match available space, device conventions, and ergonomics (previously window size classes)."). For example, the body area will use the **surface** color and the navigation area will use the **surface container** color on both mobile and tablet.

![Mobile and tablet screens both using Surface for main background and surface container for navigation background.](/assets/eb2bf413-ly2n2btl-15.Bsh9McgR.webp)

1. Surface
2. Surface container

Depending on necessary hierarchy, feature area, and design logic, you can use [add-on surface colors](#63d6db08-59e2-4341-ac33-9509eefd9b4f) in larger window class sizes as long as colors are consistently applied.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fly2nit0j-GM3-Styles-Color-Color_roles-2-v01.mp4?alt=media" aria-label="Mobile, foldable, and tablet screens showing how the body and navigation regions have the same color roles across window sizes."></video>

In this example, the body and navigation regions have the same color roles across breakpoints (**surface** and **surface container**, respectively) with the addition of other surface container colors at larger sizes.

By default, neutral-colored components such as navigation bars, menus, or dialogs are mapped to specific surface container roles, but these [roles can be remapped](advanced/overview.md) by makers to suit user needs.

![Surface container low applied to an elevated button and card, surface container applied to the top and bottom bar, surface container high applied to the FAB and basic dialog, surface container highest applied to an input label and off switch.](/assets/fd921a7d-ly2n2wcp-17.CPpsnZOs.webp)

Default surface container roles applied to components:

1. **Surface container low**
2. **Surface container&#xA0;**
3. **Surface container high**
4. **Surface container highest**

### Inverse colors

Inverse roles are applied selectively to components to achieve colors that are the reverse of those in the surrounding UI, creating a contrasting effect.

* **Inverse surface:&#xA0;**&#x42;ackground fills for elements which contrast against surface

  <br>
* **Inverse on surface:** Text and icons against inverse surface

  <br>
* **I**__nverse primary:__ Actionable elements, such as text buttons, against inverse surface

![3 color swatches: Inverse surface, inverse on surface and inverse primary roles.](/assets/5191fc35-ly2n4uvc-24.CpV9P9o3.webp)

**Inverse surface**, **inverse on surface**, and **inverse primary** roles in the color scheme, shown in light theme

![Snackbar component using inverse surface for its background, inverse on surface for its text and inverse primary of its text button, shown in light theme](/assets/b354daf5-ly2n6f78-25.D0-dE_Ug.webp)

A snackbar which uses:

1. **Inverse surface** for its background
2. **Inverse on surface** for its text
3. **Inverse primary** for its text button

<br>

## Outline

There are two outline colors to be used against a surface:

* **Outline:** Important boundaries, such as a text field outline

  <br>
* **Outline variant:** Decorative elements, such as dividers, and when other elements provide 4.5:1 contrast

![2 color swatches: Outline and outline variant](/assets/1acf96a7-ly2n6s89-18.DfGEbpDl.webp)

**Outlin**__e__ and **outline variant** roles in the color scheme, shown in light theme

![Diagram comparing used of outline and outline variant.](/assets/bc74bfa2-ly2n7081-19.B5wMaSd-.webp)

1. A text field which uses **outline&#xA0;**&#x66;or its container border
2. A list item which uses **outline variant** for its divider line

<br>

::: danger Don't
![Outline color incorrectly used for dividers](/assets/2cae00a6-ly2n7i8q-20_dont.z28Ws7--.webp)

Don’t use the **outli**__ne__ color for dividers since they have different contrast requirements. Instead, use **outline variant**.
:::

::: danger Don't
![Outline color incorrectly used for cards.](/assets/15500fce-ly2n7yd0-21_dont.DCS_sox1.webp)

Don’t use the **outline** color for components that contain multiple elements, such as cards. Instead, use **outline variant**.
:::

::: danger Don't
![Outline variant color incorrectly used for input and filter chips.](/assets/97623e2f-m38uvq2h-23_dont.3-zcmJJX.webp)

Don’t use the **outline variant** color to create visual hierarchy or define the visual boundary of targets. Instead, use the **outline** color or another color providing 3:1 contrast with the surface color.
:::

::: warning Caution
![Outline variant incorrectly color used for chips.](/assets/41804207-m4iofvjf-23_caution.P1Sen5g8.webp)

The **outline variant** color can be used for the border of targets like chips and buttons, provided that those targets contain elements inside them that provide visual contrast. In this example of chips and buttons, the icons and text inside the targets meet 4.5:1 contrast.
:::

## Add-on color roles

Most products won't need to use these add-on color roles. However, some products require the greater flexibility and control that add-on roles provide. If you aren't sure whether your product should use the add-on roles, it probably shouldn't and you can ignore them.

### Fixed accent colors

**Primary fixed, secondary fixed,&#xA0;**&#x61;nd **t**__ertiary fixed__ are fill colors used against surface. These colors maintain the same tone in light and dark themes, as opposed to regular container colors, which change in tone between these themes. The fixed color role may be used instead of the equivalent container role in situations where such fixed behavior is desired.

The **primary fixed dim**, **secondary fixed dim**, and **tertiary fixed dim** roles provide a stronger, more emphasized tone relative to the equivalent fixed color. They may be used where a deeper color but the same fixed behavior is desired.

![6 color swatches: Primary, secondary and tertiary fixed swatches, along with their darker Dim counterparts, shown in both light and dark theme.](/assets/604b9713-ly2n8qum-26.D2A8Cl-T.webp)

**Fixed** and **fixed dim** color roles for the **primary**, **secondary**, and **tertiary** color groups, shown in both light and dark themes. Note how the colors stay the same between themes.

![FAB in light and dark theme, using the primary fixed role for its container fill color.](/assets/7444c338-ly2n922v-27.c90v3tNL.webp)

A FAB which uses **primary fixed** (1) for its container fill color, shown in light and dark themes. Note how the container color stays the same between themes.

![FAB in light and dark theme, using the primary container role for its container fill color.](/assets/9e284cb3-ly2n9b76-28.B3LUd_mg.webp)

For comparison, a FAB which uses **primary container** (2) for its container fill color, shown in light and dark themes. Note how the container color changes tone between themes.

![2 email app screens using primary fixed and primary fixed dim.](/assets/4cf669e4-ly2n9m0g-29.CRt4DyJ6.webp)

Examples of fixed and fixed dim colors in use:

1. **Primary fixed** for a FAB container color
2. **Primary fixed dim** for an icon button container

<br>

::: danger Don't
![Permissions screen with Surface used for the background and Primary Fixed incorrectly used for the button fill.](/assets/13b52975-ly2n9vnb-30_dont.Clh60Xk8.webp)

Fixed colors don't change based on light or dark theme, so they're likely to cause contrast issues. Avoid using them where contrast is necessary.<br>

<br>

<br>

<br>

<br>

<br>
:::

::: tip Do
![Permissions screen with Surface used for the background and Primary correctly used for the button fill.](/assets/8bedff3c-ly2na1i9-31_do.BqcoGGMQ.webp)

Use **primary**, **secondary**, and **tertiary** roles for accent colors where contrast is needed

<br>
:::

### On fixed accent colors

**On fixed** colors are used for text and icons which sit on top of the corresponding Fixed color. For example, **on&#xA0;**__primary fixed&#xA0;__&#x69;s used for text and icons against the **primary fixed&#xA0;**&#x63;olor. The same usage applies for the equivalent secondary and tertiary colors.

<br>

**On fixed variant** colors are used for text and icons needing lower emphasis against the corresponding fixed color. For example, **on primary fixed variant&#xA0;**&#x69;s used for low emphasis text and icons against the **primary fixed&#xA0;**&#x63;olor. The same usage applies for the equivalent secondary and tertiary colors.

![6 color swatches for on fixed and on fixed variant](/assets/cb9e8b6b-ly2nacto-32.RMrJr4E7.webp)

**On fixed** and **on fixed variant** color roles for the **primary**, **secondary**, and **tertiary** accent groups, shown in both light and dark themes

![Banner in a news app using on primary fixed variant and on primary fixed](/assets/8342ac73-ly2nappf-33.Bv40I1wr.webp)

A customized banner which uses **on primary fixed variant** (1) for its deemphasized text and (2) **on primary fixed** for its emphasized text

<a id="63d6db08-59e2-4341-ac33-9509eefd9b4f"></a>

### Bright and dim surface roles

There are two add-on surface roles:

* **Surface dim:** Dimmest surface color in light and dark themes
* **Surface bright:** Brightest surface color in light and dark themes

![3 color swatches: Surface dim, surface, and surface bright](/assets/7ed4dd9b-ly2nb208-34.gaxR8OHx.webp)

**Surface dim**, **surface**, and **surface bright** in light theme

![3 color swatches: Surface dim, surface, and surface bright](/assets/729b610e-ly2nbbzl-35.tYZ_5XVV.webp)

**Surface dim**, **surface**, and **surface bright** in dark theme

While the default **surface** color automatically inverts between light and dark themes (it’s a light color in light theme and it flips to a dark color in dark theme), the **surface bright** and **surface dim** colors invert in a slightly different way. More precisely, they keep their relative brightness across both light and dark theme.

For example, in an interface using the default **surface** role, the mapped area is the brightest in light theme and the dimmest in dark theme. In an interface using the **surface bright** role, the mapped area is the brightest in both light and dark theme.

![UI with surface role applied to the body area and surface container applied to the navigation area, shown in light theme.](/assets/59f33af7-ly2nf2l7-36.BDxxHZ3r.webp)

Light theme

1. **Surface**
2. **Surface container**

![UI with surface role applied to the body area and surface container applied to the navigation area, shown in dark theme.](/assets/b92c6445-ly2nfaia-37.7SbUmxrX.webp)

Dark theme

1. **Surface**
2. **Surface container**

![UI with surface bright role applied to the body area and surface container applied to the navigation area, shown in light theme.](/assets/3f0962d3-ly2nfhyc-38.OMAhlTKN.webp)

Light theme

1. **Surface bright**
2. **Surface container**

<br>

![UI with surface bright role applied to the body area and surface container applied to the navigation area, shown in dark theme.](/assets/90d7a10e-ly2nep5x-39.aL3Lkhdg.webp)

Dark theme

1. **Surface bright**
2. **Surface container**

<br>

![Large screen chat UI. The surface dim role is applied to the left navigation rail and the surface bright role is applied to the chat window.](/assets/425369eb-ly2nfqah-40.wPzI4ZJC.webp)

1. Navigation rail with **surface dim** background
2. Chat window with **surface bright** background

<br>
