---
title: "SwitchColors"
description: "Represents the colors used by a [Switch] in different states

See [SwitchDefaults.colors] for the default implementation that follows Material specifications."
type: "interface"
---

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


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

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



```kotlin
interface SwitchColors
```


Represents the colors used by a `Switch` in different states

See `SwitchDefaults.colors` for the default implementation that follows Material specifications.


## Functions

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


Represents the color used for the switch's thumb, depending on `enabled` and `checked`.

#### Parameters

| | |
| --- | --- |
| enabled | whether the `Switch` is enabled or not |
| checked | whether the `Switch` is checked or not |



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


Represents the color used for the switch's track, depending on `enabled` and `checked`.

#### Parameters

| | |
| --- | --- |
| enabled | whether the `Switch` is enabled or not |
| checked | whether the `Switch` is checked or not |




