# ColorScheme

Artifact: [androidx.wear.protolayout:protolayout-material3](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/material3/ColorScheme.kt+class:androidx.wear.protolayout.material3.ColorScheme) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

*** ** * ** ***

<br />

```
class ColorScheme
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme` holds all the named color parameters for a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/MaterialTheme`.

Color schemes are designed to be harmonious, ensure accessible text, and distinguish UI elements and surfaces from one another.

The Material color system and custom schemes provide default values for color as a starting point for customization.

To learn more about color schemes, see [Material Design Color System](https://m3.material.io/styles/color/the-color-system/color-roles).

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#ColorScheme(androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor)( primary: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, primaryDim: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, primaryContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onPrimary: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onPrimaryContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, secondary: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, secondaryDim: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, secondaryContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onSecondary: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onSecondaryContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, tertiary: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, tertiaryDim: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, tertiaryContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onTertiary: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onTertiaryContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, surfaceContainerLow: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, surfaceContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, surfaceContainerHigh: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onSurface: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onSurfaceVariant: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, outline: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, outlineVariant: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, background: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onBackground: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, error: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, errorDim: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, errorContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onError: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor, onErrorContainer: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor )` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#background()` color that appears behind other content |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#error()` color that indicates remove, delete, close or dismiss actions. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#errorContainer()` is color that indicates errors or emergency actions, such as safety alerts. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#errorDim()` color that indicates high priority errors or emergency actions, such as safety alerts |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onBackground()` color is used for text and icons displayed on top of the background color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onError()` color is used for text and icons displayed on top of the error color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onErrorContainer()` is color used for text and icons on the errorContainer color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onPrimary()` color is used for text and icons displayed on top of the primary color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onPrimaryContainer()` color (and state variants) that should be used for content on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primaryContainer()` |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onSecondary()` color is used for text and icons displayed on top of the secondary color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onSecondaryContainer()` color (and state variants) should be used for content on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondaryContainer()` |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onSurface()` color is used for text and icons displayed on top of the surface color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onSurfaceVariant()` is the color for secondary text and icons on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#surfaceContainer()` |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onTertiary()` color is used for text and icons displayed on top of the tertiary color |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#onTertiaryContainer()` color (and state variants) that should be used for content on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#tertiaryContainer()` |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#outline()` is the main color for primary outline components. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#outlineVariant()` is the secondary color for secondary outline components |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primary()` is the color displayed most frequently across your app's screens and components |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primaryContainer()` is a standout container color for key components |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primaryDim()` is less prominent than `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primary()` for component backgrounds |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondary()` color provides more ways to accent and distinguish your product |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondaryContainer()` is a tonal color to be used in containers |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondaryDim()` is less prominent than `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondary()` for component backgrounds |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#surfaceContainer()` is the main surface color that affect surfaces of components with large containment areas, such as Card and Button |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#surfaceContainerHigh()` is a surface color used for large containment components such Card and Button with high prominence |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#surfaceContainerLow()` is a surface color used for large containment components such as Card and Button with low prominence |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#tertiary()` color that can be used to balance primary and secondary colors, or bring heightened attention to an element |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#tertiaryContainer()` is a tonal color to be used in containers |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#tertiaryDim()` is a less prominent tertiary color that can be used to balance primary and secondary colors, or bring heightened attention to an element |

## Public constructors

### ColorScheme

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
ColorScheme(
    primary: LayoutColor = ColorTokens.PRIMARY.argb,
    primaryDim: LayoutColor = ColorTokens.PRIMARY_DIM.argb,
    primaryContainer: LayoutColor = ColorTokens.PRIMARY_CONTAINER.argb,
    onPrimary: LayoutColor = ColorTokens.ON_PRIMARY.argb,
    onPrimaryContainer: LayoutColor = ColorTokens.ON_PRIMARY_CONTAINER.argb,
    secondary: LayoutColor = ColorTokens.SECONDARY.argb,
    secondaryDim: LayoutColor = ColorTokens.SECONDARY_DIM.argb,
    secondaryContainer: LayoutColor = ColorTokens.SECONDARY_CONTAINER.argb,
    onSecondary: LayoutColor = ColorTokens.ON_SECONDARY.argb,
    onSecondaryContainer: LayoutColor = ColorTokens.ON_SECONDARY_CONTAINER.argb,
    tertiary: LayoutColor = ColorTokens.TERTIARY.argb,
    tertiaryDim: LayoutColor = ColorTokens.TERTIARY_DIM.argb,
    tertiaryContainer: LayoutColor = ColorTokens.TERTIARY_CONTAINER.argb,
    onTertiary: LayoutColor = ColorTokens.ON_TERTIARY.argb,
    onTertiaryContainer: LayoutColor = ColorTokens.ON_TERTIARY_CONTAINER.argb,
    surfaceContainerLow: LayoutColor = ColorTokens.SURFACE_CONTAINER_LOW.argb,
    surfaceContainer: LayoutColor = ColorTokens.SURFACE_CONTAINER.argb,
    surfaceContainerHigh: LayoutColor = ColorTokens.SURFACE_CONTAINER_HIGH.argb,
    onSurface: LayoutColor = ColorTokens.ON_SURFACE.argb,
    onSurfaceVariant: LayoutColor = ColorTokens.ON_SURFACE_VARIANT.argb,
    outline: LayoutColor = ColorTokens.OUTLINE.argb,
    outlineVariant: LayoutColor = ColorTokens.OUTLINE_VARIANT.argb,
    background: LayoutColor = ColorTokens.BACKGROUND.argb,
    onBackground: LayoutColor = ColorTokens.ON_BACKGROUND.argb,
    error: LayoutColor = ColorTokens.ERROR.argb,
    errorDim: LayoutColor = ColorTokens.ERROR_DIM.argb,
    errorContainer: LayoutColor = ColorTokens.ERROR_CONTAINER.argb,
    onError: LayoutColor = ColorTokens.ON_ERROR.argb,
    onErrorContainer: LayoutColor = ColorTokens.ON_ERROR_CONTAINER.argb
)
```

## Public properties

### background

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val background: LayoutColor
```

color that appears behind other content

### error

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val error: LayoutColor
```

color that indicates remove, delete, close or dismiss actions. Added as a slightly less alarming and urgent alternative to errorContainer than the errorDim color

### errorContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val errorContainer: LayoutColor
```

is color that indicates errors or emergency actions, such as safety alerts. This color is for use-cases that are more alarming and urgent than the error color.

### errorDim

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val errorDim: LayoutColor
```

color that indicates high priority errors or emergency actions, such as safety alerts

### onBackground

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onBackground: LayoutColor
```

color is used for text and icons displayed on top of the background color

### onError

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onError: LayoutColor
```

color is used for text and icons displayed on top of the error color

### onErrorContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onErrorContainer: LayoutColor
```

is color used for text and icons on the errorContainer color

### onPrimary

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onPrimary: LayoutColor
```

color is used for text and icons displayed on top of the primary color

### onPrimaryContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onPrimaryContainer: LayoutColor
```

color (and state variants) that should be used for content on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primaryContainer()`

### onSecondary

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onSecondary: LayoutColor
```

color is used for text and icons displayed on top of the secondary color

### onSecondaryContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onSecondaryContainer: LayoutColor
```

color (and state variants) should be used for content on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondaryContainer()`

### onSurface

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onSurface: LayoutColor
```

color is used for text and icons displayed on top of the surface color

### onSurfaceVariant

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onSurfaceVariant: LayoutColor
```

is the color for secondary text and icons on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#surfaceContainer()`

### onTertiary

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onTertiary: LayoutColor
```

color is used for text and icons displayed on top of the tertiary color

### onTertiaryContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val onTertiaryContainer: LayoutColor
```

color (and state variants) that should be used for content on top of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#tertiaryContainer()`

### outline

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val outline: LayoutColor
```

is the main color for primary outline components. The outline color role adds contrast for accessibility purposes.

### outlineVariant

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val outlineVariant: LayoutColor
```

is the secondary color for secondary outline components

### primary

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val primary: LayoutColor
```

is the color displayed most frequently across your app's screens and components

### primaryContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val primaryContainer: LayoutColor
```

is a standout container color for key components

### primaryDim

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val primaryDim: LayoutColor
```

is less prominent than `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#primary()` for component backgrounds

### secondary

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val secondary: LayoutColor
```

color provides more ways to accent and distinguish your product

### secondaryContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val secondaryContainer: LayoutColor
```

is a tonal color to be used in containers

### secondaryDim

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val secondaryDim: LayoutColor
```

is less prominent than `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material3/ColorScheme#secondary()` for component backgrounds

### surfaceContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val surfaceContainer: LayoutColor
```

is the main surface color that affect surfaces of components with large containment areas, such as Card and Button

### surfaceContainerHigh

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val surfaceContainerHigh: LayoutColor
```

is a surface color used for large containment components such Card and Button with high prominence

### surfaceContainerLow

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val surfaceContainerLow: LayoutColor
```

is a surface color used for large containment components such as Card and Button with low prominence

### tertiary

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val tertiary: LayoutColor
```

color that can be used to balance primary and secondary colors, or bring heightened attention to an element

### tertiaryContainer

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val tertiaryContainer: LayoutColor
```

is a tonal color to be used in containers

### tertiaryDim

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
val tertiaryDim: LayoutColor
```

is a less prominent tertiary color that can be used to balance primary and secondary colors, or bring heightened attention to an element