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

```kotlin
public object SwitchDefaults
```

Contains the default values used by [Switch](/jetpack-compose/androidx.glance/glance-appwidget/composable-functions/Switch).

## Functions

<h2 id="colors-checkedthumbcolor-uncheckedthumbcolor-checkedtrackcolor-uncheckedtrackcolor">colors</h2>

```kotlin
@Composable
public fun colors(
    checkedThumbColor: ColorProvider,
    uncheckedThumbColor: ColorProvider,
    checkedTrackColor: ColorProvider,
    uncheckedTrackColor: ColorProvider,
): SwitchColors
```

SwitchColors to tint the thumb and track of the [Switch](/jetpack-compose/androidx.glance/glance-appwidget/composable-functions/Switch) according to the checked state.

#### Parameters

| | |
| --- | --- |
| checkedThumbColor | the tint to apply to the thumb of the switch when it is checked |
| uncheckedThumbColor | the tint to apply to the thumb of the switch when it is not checked |
| checkedTrackColor | the tint to apply to the track of the switch when it is checked |
| uncheckedTrackColor | the tint to apply to the track of the switch when it is not checked |

<hr class="docs-overload-divider">

<h2 id="switchcolors-checkedthumbcolor-uncheckedthumbcolor-checkedtrackcolor-uncheckedtrackcolor">switchColors</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public fun switchColors(
    checkedThumbColor: ColorProvider,
    uncheckedThumbColor: ColorProvider,
    checkedTrackColor: ColorProvider,
    uncheckedTrackColor: ColorProvider,
): SwitchColors
```

<hr class="docs-overload-divider">

<h2 id="colors">colors</h2>

```kotlin
@Composable
public fun colors(): SwitchColors
```

SwitchColors to tint the thumb and track of the [Switch](/jetpack-compose/androidx.glance/glance-appwidget/composable-functions/Switch) according to the checked state.

#### Returns

| | |
| --- | --- |
|  | a default set of [SwitchColors](/jetpack-compose/androidx.glance/glance-appwidget/classes/SwitchColors). |