# ButtonColors

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

*** ** * ** ***


```
class ButtonColors
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use the new class `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonColors` which provides the same API and functionality.

Represents the background and content colors used in a button Tiles component.

See `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonDefaults#PRIMARY_COLORS()` for the default colors used in a primary styled `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/Button`. See `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonDefaults#SECONDARY_COLORS()` for the default colors used in a secondary styled `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/Button`.

## Summary

| ### Public constructors |
|---|
| `[ButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#ButtonColors(androidx.wear.tiles.ColorBuilders.ColorProp,androidx.wear.tiles.ColorBuilders.ColorProp))( backgroundColor: https://developer.android.com/reference/kotlin/androidx/wear/tiles/ColorBuilders.ColorProp, contentColor: https://developer.android.com/reference/kotlin/androidx/wear/tiles/ColorBuilders.ColorProp )` **This function is deprecated.** Deprecated in Java |
| `[ButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#ButtonColors(int,int))(backgroundColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, contentColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/tiles/ColorBuilders.ColorProp` | `[getBackgroundColor](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#getBackgroundColor())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/wear/tiles/ColorBuilders.ColorProp` | `[getContentColor](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#getContentColor())()` **This function is deprecated.** Deprecated in Java |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors` | `[primaryButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#primaryButtonColors(androidx.wear.tiles.material.Colors))(colors: https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/Colors)` **This function is deprecated.** Deprecated in Java |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors` | `[secondaryButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#secondaryButtonColors(androidx.wear.tiles.material.Colors))(colors: https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/Colors)` **This function is deprecated.** Deprecated in Java |

## Public constructors

### ButtonColors

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
[ButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#ButtonColors(androidx.wear.tiles.ColorBuilders.ColorProp,androidx.wear.tiles.ColorBuilders.ColorProp))(
    backgroundColor: ColorBuilders.ColorProp,
    contentColor: ColorBuilders.ColorProp
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Constructor for `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors` object.

| Parameters |
|---|---|
| `backgroundColor: https://developer.android.com/reference/kotlin/androidx/wear/tiles/ColorBuilders.ColorProp` | The background color to be used for a button. |
| `contentColor: https://developer.android.com/reference/kotlin/androidx/wear/tiles/ColorBuilders.ColorProp` | The content color or tint color to be used for a button. |

### ButtonColors

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
[ButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#ButtonColors(int,int))(backgroundColor: @ColorInt Int, contentColor: @ColorInt Int)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Constructor for `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors` object.

| Parameters |
|---|---|
| `backgroundColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The background color to be used for a button Tiles component. Should be in ARGB format. |
| `contentColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The content color or tint color to be used for a button Tiles component. Should be in ARGB format. |

## Public functions

### getBackgroundColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
fun [getBackgroundColor](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#getBackgroundColor())(): ColorBuilders.ColorProp
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

The background color to be used on a button Tiles components.

### getContentColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
fun [getContentColor](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#getContentColor())(): ColorBuilders.ColorProp
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

The content or tint color to be used on a button Tiles components.

### primaryButtonColors

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
java-static fun [primaryButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#primaryButtonColors(androidx.wear.tiles.material.Colors))(colors: Colors): ButtonColors
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors` object, using the current Primary colors from the given `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/Colors`.

### secondaryButtonColors

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
java-static fun [secondaryButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors#secondaryButtonColors(androidx.wear.tiles.material.Colors))(colors: Colors): ButtonColors
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/ButtonColors` object, using the current Surface colors from the given `https://developer.android.com/reference/kotlin/androidx/wear/tiles/material/Colors`.