# ToggleChipColors

# ToggleChipColors

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/ToggleChip.kt+class:androidx.wear.compose.material.ToggleChipColors)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.0.0)

<br />

```
interface ToggleChipColors
```

<br />

*** ** * ** ***

Represents the background and content colors used in[ToggleChip](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/package-summary#ToggleChip(kotlin.Boolean,kotlin.Function1,kotlin.Function1,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function1,androidx.wear.compose.material.ToggleChipColors,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.layout.PaddingValues,androidx.compose.ui.graphics.Shape))s in different states.

## Summary

|                                                                                        ### Public functions                                                                                        |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State)`<`[Painter](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter)`>` | `@`[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable) [background](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#background(kotlin.Boolean,kotlin.Boolean))`(enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`, checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Represents the background treatment for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#background(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#background(kotlin.Boolean,kotlin.Boolean))properties.                                                 |
| [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State)`<`[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)`>`             | `@`[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable) [contentColor](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#contentColor(kotlin.Boolean,kotlin.Boolean))`(enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`, checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Represents the content color for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#contentColor(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#contentColor(kotlin.Boolean,kotlin.Boolean))properties.                                                |
| [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State)`<`[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)`>`             | `@`[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable) [secondaryContentColor](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#secondaryContentColor(kotlin.Boolean,kotlin.Boolean))`(enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`, checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Represents the secondary content color for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#secondaryContentColor(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#secondaryContentColor(kotlin.Boolean,kotlin.Boolean))properties.  |
| [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State)`<`[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)`>`             | `@`[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable) [toggleControlColor](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#toggleControlColor(kotlin.Boolean,kotlin.Boolean))`(enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`, checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Represents the color for the toggle control content for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#toggleControlColor(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#toggleControlColor(kotlin.Boolean,kotlin.Boolean))properties. |

## Public functions

### background

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

```
@Composable
fun background(enabled: Boolean, checked: Boolean): State<Painter>
```

Represents the background treatment for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#background(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#background(kotlin.Boolean,kotlin.Boolean))properties. Backgrounds are typically a linear gradient when the chip is checked and solid when it is not.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|----------------------------------------------------|
| `enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is enabled                        |
| `checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is currently checked or unchecked |

### contentColor

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

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

Represents the content color for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#contentColor(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#contentColor(kotlin.Boolean,kotlin.Boolean))properties.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|----------------------------------------------------|
| `enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is enabled                        |
| `checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is currently checked or unchecked |

### secondaryContentColor

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

```
@Composable
fun secondaryContentColor(enabled: Boolean, checked: Boolean): State<Color>
```

Represents the secondary content color for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#secondaryContentColor(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#secondaryContentColor(kotlin.Boolean,kotlin.Boolean))properties.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|----------------------------------------------------|
| `enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is enabled                        |
| `checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is currently checked or unchecked |

### toggleControlColor

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

```
@Composable
fun toggleControlColor(enabled: Boolean, checked: Boolean): State<Color>
```

Represents the color for the toggle control content for this chip, depending on the[enabled](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#toggleControlColor(kotlin.Boolean,kotlin.Boolean))and[checked](https://developer.android.com/reference/kotlin/androidx/wear/compose/material/ToggleChipColors#toggleControlColor(kotlin.Boolean,kotlin.Boolean))properties.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|----------------------------------------------------|
| `enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is enabled                        |
| `checked: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | Whether the chip is currently checked or unchecked |