---
title: "SwitchButtonColors"
description: "Represents the different container and content colors used for [SwitchButton], in various states,
that are checked, unchecked, enabled and disabled."
type: "class"
---

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


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

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


```kotlin
public class SwitchButtonColors(
    public val checkedContainerColor: Color,
    public val checkedContentColor: Color,
    public val checkedSecondaryContentColor: Color,
    public val checkedIconColor: Color,
    public val checkedThumbColor: Color,
    public val checkedThumbIconColor: Color,
    public val checkedTrackBorderColor: Color,
    public val checkedTrackColor: Color,
    public val uncheckedContainerColor: Color,
    public val uncheckedContentColor: Color,
    public val uncheckedSecondaryContentColor: Color,
    public val uncheckedIconColor: Color,
    public val uncheckedThumbColor: Color,
    public val uncheckedTrackColor: Color,
    public val uncheckedTrackBorderColor: Color,
    public val disabledCheckedContainerColor: Color,
    public val disabledCheckedContentColor: Color,
    public val disabledCheckedSecondaryContentColor: Color,
    public val disabledCheckedIconColor: Color,
    public val disabledCheckedThumbColor: Color,
    public val disabledCheckedThumbIconColor: Color,
    public val disabledCheckedTrackColor: Color,
    public val disabledCheckedTrackBorderColor: Color,
    public val disabledUncheckedContainerColor: Color,
    public val disabledUncheckedContentColor: Color,
    public val disabledUncheckedSecondaryContentColor: Color,
    public val disabledUncheckedIconColor: Color,
    public val disabledUncheckedThumbColor: Color,
    public val disabledUncheckedTrackBorderColor: Color,
)
```


Represents the different container and content colors used for `SwitchButton`, in various states,
that are checked, unchecked, enabled and disabled.

#### Parameters

| | |
| --- | --- |
| checkedContainerColor | Container or background color when the `SwitchButton` is checked |
| checkedContentColor | Color of the content like label when the `SwitchButton` is checked |
| checkedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is checked |
| checkedIconColor | Color of the icon when the `SwitchButton` is checked |
| checkedThumbColor | Color of the thumb when the `SwitchButton` is checked |
| checkedThumbIconColor | Color of the thumb icon when the `SwitchButton` is checked |
| checkedTrackColor | Color of the track when the `SwitchButton` is checked |
| checkedTrackBorderColor | Color of the track boarder when the `SwitchButton` is checked |
| uncheckedContainerColor | Container or background color when the `SwitchButton` is unchecked |
| uncheckedContentColor | Color of the content like label when the `SwitchButton` is unchecked |
| uncheckedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is unchecked |
| uncheckedIconColor | Color of the icon when the `SwitchButton` is unchecked |
| uncheckedThumbColor | Color of the thumb when the `SwitchButton` is unchecked |
| uncheckedTrackColor | Color of the track when the `SwitchButton` is unchecked |
| uncheckedTrackBorderColor | Color of the track border when the `SwitchButton` is unchecked |
| disabledCheckedContainerColor | Container or background color when the `SwitchButton` is disabled and checked |
| disabledCheckedContentColor | Color of content like label when the `SwitchButton` is disabled and checked |
| disabledCheckedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is disabled and checked |
| disabledCheckedIconColor | Icon color when the `SwitchButton` is disabled and checked |
| disabledCheckedThumbColor | Thumb color when the `SwitchButton` is disabled and checked |
| disabledCheckedThumbIconColor | Thumb icon color when the `SwitchButton` is disabled and checked |
| disabledCheckedTrackColor | Track color when the `SwitchButton` is disabled and checked |
| disabledCheckedTrackBorderColor | Track border color when the `SwitchButton` is disabled and checked |
| disabledUncheckedContainerColor | Container or background color when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedContentColor | Color of the content like label when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedIconColor | Icon color when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedThumbColor | Thumb color when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedTrackBorderColor | Track border color when the `SwitchButton` is disabled and unchecked |



## Functions

```kotlin
public fun copy(
        checkedContainerColor: Color = this.checkedContainerColor,
        checkedContentColor: Color = this.checkedContentColor,
        checkedSecondaryContentColor: Color = this.checkedSecondaryContentColor,
        checkedIconColor: Color = this.checkedIconColor,
        checkedThumbColor: Color = this.checkedThumbColor,
        checkedThumbIconColor: Color = this.checkedThumbIconColor,
        checkedTrackColor: Color = this.checkedTrackColor,
        checkedTrackBorderColor: Color = this.checkedTrackBorderColor,
        uncheckedContainerColor: Color = this.uncheckedContainerColor,
        uncheckedContentColor: Color = this.uncheckedContentColor,
        uncheckedSecondaryContentColor: Color = this.uncheckedSecondaryContentColor,
        uncheckedIconColor: Color = this.uncheckedIconColor,
        uncheckedThumbColor: Color = this.uncheckedThumbColor,
        uncheckedTrackColor: Color = this.uncheckedTrackColor,
        uncheckedTrackBorderColor: Color = this.uncheckedTrackBorderColor,
        disabledCheckedContainerColor: Color = this.disabledCheckedContainerColor,
        disabledCheckedContentColor: Color = this.disabledCheckedContentColor,
        disabledCheckedSecondaryContentColor: Color = this.disabledCheckedSecondaryContentColor,
        disabledCheckedIconColor: Color = this.disabledCheckedIconColor,
        disabledCheckedThumbColor: Color = this.disabledCheckedThumbColor,
        disabledCheckedThumbIconColor: Color = this.disabledCheckedThumbIconColor,
        disabledCheckedTrackColor: Color = this.disabledCheckedTrackColor,
        disabledCheckedTrackBorderColor: Color = this.disabledCheckedTrackBorderColor,
        disabledUncheckedContainerColor: Color = this.disabledUncheckedContainerColor,
        disabledUncheckedContentColor: Color = this.disabledUncheckedContentColor,
        disabledUncheckedSecondaryContentColor: Color = this.disabledUncheckedSecondaryContentColor,
        disabledUncheckedIconColor: Color = this.disabledUncheckedIconColor,
        disabledUncheckedThumbColor: Color = this.disabledUncheckedThumbColor,
        disabledUncheckedTrackBorderColor: Color = this.disabledUncheckedTrackBorderColor,
    ): SwitchButtonColors
```


Returns a copy of this SwitchButtonColors optionally overriding some of the values.

#### Parameters

| | |
| --- | --- |
| checkedContainerColor | Container or background color when the `SwitchButton` is checked |
| checkedContentColor | Color of the content like label when the `SwitchButton` is checked |
| checkedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is checked |
| checkedIconColor | Color of the icon when the `SwitchButton` is checked |
| checkedThumbColor | Color of the thumb when the `SwitchButton` is checked |
| checkedThumbIconColor | Color of the thumb icon when the `SwitchButton` is checked |
| checkedTrackColor | Color of the track when the `SwitchButton` is checked |
| checkedTrackBorderColor | Color of the track boarder when the `SwitchButton` is checked |
| uncheckedContainerColor | Container or background color when the `SwitchButton` is unchecked |
| uncheckedContentColor | Color of the content like label when the `SwitchButton` is unchecked |
| uncheckedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is unchecked |
| uncheckedIconColor | Color of the icon when the `SwitchButton` is unchecked |
| uncheckedThumbColor | Color of the thumb when the `SwitchButton` is unchecked |
| uncheckedTrackColor | Color of the track when the `SwitchButton` is unchecked |
| uncheckedTrackBorderColor | Color of the track border when the `SwitchButton` is unchecked |
| disabledCheckedContainerColor | Container or background color when the `SwitchButton` is disabled and checked |
| disabledCheckedContentColor | Color of content like label when the `SwitchButton` is disabled and checked |
| disabledCheckedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is disabled and checked |
| disabledCheckedIconColor | Icon color when the `SwitchButton` is disabled and checked |
| disabledCheckedThumbColor | Thumb color when the `SwitchButton` is disabled and checked |
| disabledCheckedThumbIconColor | Thumb icon color when the `SwitchButton` is disabled and checked |
| disabledCheckedTrackColor | Track color when the `SwitchButton` is disabled and checked |
| disabledCheckedTrackBorderColor | Track border color when the `SwitchButton` is disabled and checked |
| disabledUncheckedContainerColor | Container or background color when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedContentColor | Color of the content like label when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedSecondaryContentColor | Color of the secondary content like secondary label when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedIconColor | Icon color when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedThumbColor | Thumb color when the `SwitchButton` is disabled and unchecked |
| disabledUncheckedTrackBorderColor | Track border color when the `SwitchButton` is disabled and unchecked |




