# ButtonColors

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

<br />

```
interface ButtonColors
```

<br />

*** ** * ** ***

Represents the background and content colors used in a button in different states.

See `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonDefaults#primaryButtonColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)` for the default colors used in a primary styled `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Button.composable#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material.ButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.ui.graphics.Shape,androidx.wear.compose.material.ButtonBorder,kotlin.Function1)`. See `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonDefaults#secondaryButtonColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)` for the default colors used in a secondary styled `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/Button.composable#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material.ButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.ui.graphics.Shape,androidx.wear.compose.material.ButtonBorder,kotlin.Function1)`.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonColors#backgroundColor(kotlin.Boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the background color for this button, depending on `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonColors#backgroundColor(kotlin.Boolean)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonColors#contentColor(kotlin.Boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the content color for this button, depending on `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonColors#contentColor(kotlin.Boolean)`. |

## Public functions

### backgroundColor

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

```
@Composable
fun backgroundColor(enabled: Boolean): State<Color>
```

Represents the background color for this button, depending on `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonColors#backgroundColor(kotlin.Boolean)`.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the button is enabled |

### contentColor

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

```
@Composable
fun contentColor(enabled: Boolean): State<Color>
```

Represents the content color for this button, depending on `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ButtonColors#contentColor(kotlin.Boolean)`.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the button is enabled |