# Colors

Artifact: [androidx.wear.protolayout:protolayout-material](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/material/Colors.java+class:androidx.wear.protolayout.material.Colors) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public class Colors
```

<br />

*** ** * ** ***

Represent the container for default color scheme in your Tile, that can be used to create color objects for all Material components.

See `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#DEFAULT()` for default color scheme.

## Summary

| ### Constants |
|---|---|
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/Colors` | `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#DEFAULT()` The default color scheme to be used in ProtoLayout Material components. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#Colors(int,int,int,int)( @https://developer.android.com/reference/androidx/annotation/ColorInt int primary, @https://developer.android.com/reference/androidx/annotation/ColorInt int onPrimary, @https://developer.android.com/reference/androidx/annotation/ColorInt int surface, @https://developer.android.com/reference/androidx/annotation/ColorInt int onSurface )` Constructor for `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors` object. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#getOnPrimary()()` The onPrimary color to be used on components. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#getOnSurface()()` The onSurface color to be used on components. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#getPrimary()()` The primary color to be used on components. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors#getSurface()()` The surface color to be used on components. |

## Constants

### DEFAULT

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

```
public static final @NonNull Colors DEFAULT
```

The default color scheme to be used in ProtoLayout Material components.

## Public constructors

### Colors

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

```
public Colors(
    @ColorInt int primary,
    @ColorInt int onPrimary,
    @ColorInt int surface,
    @ColorInt int onSurface
)
```

Constructor for `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors` object.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int primary` | The background color to be used for primary components. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int onPrimary` | The content color or tint color to be used for primary components. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int surface` | The background color to be used for secondary components. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int onSurface` | The content color or tint color to be used for secondary components. Should be in ARGB format. |

## Public methods

### getOnPrimary

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

```
public @ColorInt int getOnPrimary()
```

The onPrimary color to be used on components.

### getOnSurface

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

```
public @ColorInt int getOnSurface()
```

The onSurface color to be used on components.

### getPrimary

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

```
public @ColorInt int getPrimary()
```

The primary color to be used on components.

### getSurface

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

```
public @ColorInt int getSurface()
```

The surface color to be used on components.