# ToggleButtonColors

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/ToggleButton.kt+class:androidx.xr.glimmer.ToggleButtonColors) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)


```
class ToggleButtonColors
```

<br />

*** ** * ** ***

Represents the colors used by a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButton.composable#ToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.xr.glimmer.ButtonSize,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Shape,androidx.xr.glimmer.ToggleButtonColors,androidx.compose.foundation.layout.PaddingValues,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)` in different states.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#ToggleButtonColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( backgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedBackgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, checkedBackgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedCheckedBackgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, contentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, checkedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedCheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( backgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedBackgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, checkedBackgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedCheckedBackgroundColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, contentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, checkedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, focusedCheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` Returns a copy of this `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors`, optionally overriding some of the values. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#hashCode()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#backgroundColor()` the background color when the button is unchecked and unfocused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#checkedBackgroundColor()` the background color when the button is checked and unfocused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#checkedContentColor()` the content color when the button is checked and unfocused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#contentColor()` the content color when the button is unchecked and unfocused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#focusedBackgroundColor()` the background color when the button is unchecked and focused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#focusedCheckedBackgroundColor()` the background color when the button is checked and focused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#focusedCheckedContentColor()` the content color when the button is checked and focused |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors#focusedContentColor()` the content color when the button is unchecked and focused |

## Public constructors

### ToggleButtonColors

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
ToggleButtonColors(
    backgroundColor: Color,
    focusedBackgroundColor: Color,
    checkedBackgroundColor: Color,
    focusedCheckedBackgroundColor: Color,
    contentColor: Color,
    focusedContentColor: Color,
    checkedContentColor: Color,
    focusedCheckedContentColor: Color
)
```

## Public functions

### copy

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
fun copy(
    backgroundColor: Color = this.backgroundColor,
    focusedBackgroundColor: Color = this.focusedBackgroundColor,
    checkedBackgroundColor: Color = this.checkedBackgroundColor,
    focusedCheckedBackgroundColor: Color = this.focusedCheckedBackgroundColor,
    contentColor: Color = this.contentColor,
    focusedContentColor: Color = this.focusedContentColor,
    checkedContentColor: Color = this.checkedContentColor,
    focusedCheckedContentColor: Color = this.focusedCheckedContentColor
): ToggleButtonColors
```

Returns a copy of this `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/ToggleButtonColors`, optionally overriding some of the values.

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### backgroundColor

```
val backgroundColor: Color
```

the background color when the button is unchecked and unfocused

### checkedBackgroundColor

```
val checkedBackgroundColor: Color
```

the background color when the button is checked and unfocused

### checkedContentColor

```
val checkedContentColor: Color
```

the content color when the button is checked and unfocused

### contentColor

```
val contentColor: Color
```

the content color when the button is unchecked and unfocused

### focusedBackgroundColor

```
val focusedBackgroundColor: Color
```

the background color when the button is unchecked and focused

### focusedCheckedBackgroundColor

```
val focusedCheckedBackgroundColor: Color
```

the background color when the button is checked and focused

### focusedCheckedContentColor

```
val focusedCheckedContentColor: Color
```

the content color when the button is checked and focused

### focusedContentColor

```
val focusedContentColor: Color
```

the content color when the button is unchecked and focused