# ButtonColors

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

  ```
  interface ButtonColors
  ```

*** ** * ** ***

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

See `https://developer.android.com/reference/kotlin/androidx/compose/material/ButtonDefaults#buttonColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)` for the default colors used in a `https://developer.android.com/reference/kotlin/androidx/compose/material/Button.composable#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.ButtonElevation,androidx.compose.ui.graphics.Shape,androidx.compose.foundation.BorderStroke,androidx.compose.material.ButtonColors,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)`. See `https://developer.android.com/reference/kotlin/androidx/compose/material/ButtonDefaults#outlinedButtonColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)` for the default colors used in a `https://developer.android.com/reference/kotlin/androidx/compose/material/OutlinedButton.composable#OutlinedButton(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.ButtonElevation,androidx.compose.ui.graphics.Shape,androidx.compose.foundation.BorderStroke,androidx.compose.material.ButtonColors,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1)`. See `https://developer.android.com/reference/kotlin/androidx/compose/material/ButtonDefaults#textButtonColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)` for the default colors used in a `https://developer.android.com/reference/kotlin/androidx/compose/material/TextButton.composable#TextButton(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.ButtonElevation,androidx.compose.ui.graphics.Shape,androidx.compose.foundation.BorderStroke,androidx.compose.material.ButtonColors,androidx.compose.foundation.layout.PaddingValues,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/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/compose/material/ButtonColors#backgroundColor(kotlin.Boolean)`. | Cmn |
| `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/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/compose/material/ButtonColors#contentColor(kotlin.Boolean)`. | Cmn |

## Public functions

### backgroundColor

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#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/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

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#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/compose/material/ButtonColors#contentColor(kotlin.Boolean)`.

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