# 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)

*** ** * ** ***


```
public class ButtonColors
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use the new class `https://developer.android.com/reference/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/androidx/wear/tiles/material/ButtonDefaults#PRIMARY_COLORS()` for the default colors used in a primary styled `https://developer.android.com/reference/androidx/wear/tiles/material/Button`. See `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#SECONDARY_COLORS()` for the default colors used in a secondary styled `https://developer.android.com/reference/androidx/wear/tiles/material/Button`.

## Summary

| ### Public constructors |
|---|
| `[ButtonColors](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#ButtonColors(androidx.wear.tiles.ColorBuilders.ColorProp,androidx.wear.tiles.ColorBuilders.ColorProp))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/ColorBuilders.ColorProp backgroundColor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/ColorBuilders.ColorProp contentColor )` **This method is deprecated.** Deprecated in Java |
| `[ButtonColors](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#ButtonColors(int,int))(@https://developer.android.com/reference/androidx/annotation/ColorInt int backgroundColor, @https://developer.android.com/reference/androidx/annotation/ColorInt int contentColor)` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/ColorBuilders.ColorProp` | `[getBackgroundColor](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#getBackgroundColor())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/ColorBuilders.ColorProp` | `[getContentColor](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#getContentColor())()` **This method is deprecated.** Deprecated in Java |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors` | `[primaryButtonColors](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#primaryButtonColors(androidx.wear.tiles.material.Colors))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/Colors colors)` **This method is deprecated.** Deprecated in Java |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors` | `[secondaryButtonColors](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#secondaryButtonColors(androidx.wear.tiles.material.Colors))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/Colors colors)` **This method 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)

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

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

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/ColorBuilders.ColorProp backgroundColor` | The background color to be used for a button. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/ColorBuilders.ColorProp contentColor` | 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)

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

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

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

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

## Public methods

### 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)

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

> [!CAUTION]
> **This method 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)

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

> [!CAUTION]
> **This method 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)

```
public static @NonNull ButtonColors [primaryButtonColors](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#primaryButtonColors(androidx.wear.tiles.material.Colors))(@NonNull Colors colors)
```

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

Returns a `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors` object, using the current Primary colors from the given `https://developer.android.com/reference/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)

```
public static @NonNull ButtonColors [secondaryButtonColors](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors#secondaryButtonColors(androidx.wear.tiles.material.Colors))(@NonNull Colors colors)
```

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

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