---
title: "ToggleButtonColors"
description: "Represents the colors used by a ToggleButton in different states."
type: "class"
lastmod: "2026-05-08T01:17:00.916695Z"
---
## API Reference

> Source set: Android

```kotlin
public class ToggleButtonColors(
    public val backgroundColor: Color,
    public val checkedBackgroundColor: Color,
    public val contentColor: Color,
    public val checkedContentColor: Color,
)
```

Represents the colors used by a [ToggleButton](/jetpack-compose/androidx.xr.glimmer/glimmer/components/ToggleButton) in different states.

## Functions

### copy

```kotlin
public fun copy(
        backgroundColor: Color = this.backgroundColor,
        checkedBackgroundColor: Color = this.checkedBackgroundColor,
        contentColor: Color = this.contentColor,
        checkedContentColor: Color = this.checkedContentColor,
    ): ToggleButtonColors
```

Returns a copy of this [ToggleButtonColors](/jetpack-compose/androidx.xr.glimmer/glimmer/classes/ToggleButtonColors), optionally overriding some of the values.
