---
title: "ToggleButtonColors"
description: "Represents the background and content colors used in a toggle button in different states.

See [ToggleButtonDefaults.toggleButtonColors] for the default colors used, which are
primary-styled for a checked toggle button and surface-styled for unchecked."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>



```kotlin
public interface ToggleButtonColors
```


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

See `ToggleButtonDefaults.toggleButtonColors` for the default colors used, which are
primary-styled for a checked toggle button and surface-styled for unchecked.


## Functions

```kotlin
@Composable public fun backgroundColor(enabled: Boolean, checked: Boolean): State<Color>
```


Represents the background color for this toggle button, depending on `enabled` and `checked`.

#### Parameters

| | |
| --- | --- |
| enabled | whether the toggle button is enabled |
| checked | whether the toggle button is checked |



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


Represents the content color for this toggle button, depending on `enabled` and `checked`.

#### Parameters

| | |
| --- | --- |
| enabled | whether the toggle button is enabled |
| checked | whether the toggle button is checked |




