# ButtonColors

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/ButtonDefaults.kt+class:androidx.wear.protolayout.material3.ButtonColors) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

*** ** * ** ***


```
public final class ButtonColors
```

<br />

*** ** * ** ***

Represents the container and content colors used in buttons, such as `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).textEdgeButton(androidx.wear.protolayout.ModifiersBuilders.Clickable,androidx.wear.protolayout.modifiers.LayoutModifier,androidx.wear.protolayout.material3.ButtonColors,kotlin.Function1)` or `https://developer.android.com/reference/androidx/wear/protolayout/material3/package-summary#(androidx.wear.protolayout.material3.MaterialScope).iconEdgeButton(androidx.wear.protolayout.ModifiersBuilders.Clickable,androidx.wear.protolayout.modifiers.LayoutModifier,androidx.wear.protolayout.material3.ButtonColors,kotlin.Function1)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors#ButtonColors(androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor containerColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor iconColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryLabelColor )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors#copy(androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor,androidx.wear.protolayout.types.LayoutColor)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor containerColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor iconColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryLabelColor )` Returns a copy of this `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors`, optionally overriding some of the values. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors#getContainerColor()()` The container color to be used for a button's background. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors#getIconColor()()` The icon tint color to be used for a button. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors#getLabelColor()()` The label color to be used for a button. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor` | `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors#getSecondaryLabelColor()()` The secondary label color to be used for a button. |

## Public constructors

### ButtonColors

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

```
public ButtonColors(
    @NonNull LayoutColor containerColor,
    @NonNull LayoutColor iconColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryLabelColor
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor containerColor` | The container color to be used for a button's background. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor iconColor` | The icon tint color to be used for a button. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor` | The label color to be used for a button. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryLabelColor` | The secondary label color to be used for a button. |

## Public methods

### copy

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

```
public final @NonNull ButtonColors copy(
    @NonNull LayoutColor containerColor,
    @NonNull LayoutColor iconColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryLabelColor
)
```

Returns a copy of this `https://developer.android.com/reference/androidx/wear/protolayout/material3/ButtonColors`, optionally overriding some of the values.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor containerColor` | The container color to be used for a button's background. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor iconColor` | The icon tint color to be used for a button. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor labelColor` | The label color to be used for a button. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/protolayout/types/LayoutColor secondaryLabelColor` | The secondary label color to be used for a button. |

### getContainerColor

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

```
public final @NonNull LayoutColor getContainerColor()
```

The container color to be used for a button's background.

### getIconColor

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

```
public final @NonNull LayoutColor getIconColor()
```

The icon tint color to be used for a button.

### getLabelColor

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

```
public final @NonNull LayoutColor getLabelColor()
```

The label color to be used for a button.

### getSecondaryLabelColor

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

```
public final @NonNull LayoutColor getSecondaryLabelColor()
```

The secondary label color to be used for a button.