---
title: "IconToggleButtonColors"
description: "Represents the container and content colors used in a toggleable icon button in different states.

- See [IconButtonDefaults.filledIconToggleButtonColors] and [IconButtonDefaults.filledTonalIconToggleButtonColors] for the default colors used in a [FilledIconButton].
- See [IconButtonDefaults.outlinedIconToggleButtonVibrantColors] for the default colors used in a toggleable [OutlinedIconButton]."
type: "class"
---

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


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

<div class='sourceset sourceset-common'>Common</div>


```kotlin
class IconToggleButtonColors(
    val containerColor: Color,
    val contentColor: Color,
    val disabledContainerColor: Color,
    val disabledContentColor: Color,
    val checkedContainerColor: Color,
    val checkedContentColor: Color,
)
```


Represents the container and content colors used in a toggleable icon button in different states.

- See `IconButtonDefaults.filledIconToggleButtonColors` and `IconButtonDefaults.filledTonalIconToggleButtonColors` for the default colors used in a `FilledIconButton`.
- See `IconButtonDefaults.outlinedIconToggleButtonVibrantColors` for the default colors used in a toggleable `OutlinedIconButton`.

#### Parameters

| | |
| --- | --- |
| containerColor | the container color of this icon button when enabled. |
| contentColor | the content color of this icon button when enabled. |
| disabledContainerColor | the container color of this icon button when not enabled. |
| disabledContentColor | the content color of this icon button when not enabled. |
| checkedContainerColor | the container color of this icon button when checked. |
| checkedContentColor | the content color of this icon button when checked. |



## Functions

```kotlin
fun copy(
        containerColor: Color = this.containerColor,
        contentColor: Color = this.contentColor,
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledContentColor: Color = this.disabledContentColor,
        checkedContainerColor: Color = this.checkedContainerColor,
        checkedContentColor: Color = this.checkedContentColor,
    ) =
        IconToggleButtonColors(
            containerColor.takeOrElse { this.containerColor },
            contentColor.takeOrElse { this.contentColor },
            disabledContainerColor.takeOrElse { this.disabledContainerColor },
            disabledContentColor.takeOrElse { this.disabledContentColor },
            checkedContainerColor.takeOrElse { this.checkedContainerColor },
            checkedContentColor.takeOrElse { this.checkedContentColor },
        )
```


Returns a copy of this IconToggleButtonColors, optionally overriding some of the values. This
uses the Color.Unspecified to mean “use the value from the source”



