# SliderColors

Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Slider.kt+class:androidx.compose.material.SliderColors) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface SliderColors
  ```

*** ** * ** ***

Represents the colors used by a `https://developer.android.com/reference/kotlin/androidx/compose/material/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.SliderColors)` and its parts in different states

See `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderDefaults#colors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)` for the default implementation that follows Material specifications.

## Summary

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#thumbColor(kotlin.Boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the color used for the sliders's thumb, depending on `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#thumbColor(kotlin.Boolean)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#tickColor(kotlin.Boolean,kotlin.Boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, active: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the color used for the sliders's tick which is the dot separating steps, if they are set on the slider, depending on `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#tickColor(kotlin.Boolean,kotlin.Boolean)` and `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#tickColor(kotlin.Boolean,kotlin.Boolean)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#trackColor(kotlin.Boolean,kotlin.Boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, active: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the color used for the sliders's track, depending on `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#trackColor(kotlin.Boolean,kotlin.Boolean)` and `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#trackColor(kotlin.Boolean,kotlin.Boolean)`. | Cmn |

## Public functions

### thumbColor

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

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

Represents the color used for the sliders's thumb, depending on `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#thumbColor(kotlin.Boolean)`.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the `https://developer.android.com/reference/kotlin/androidx/compose/material/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.SliderColors)` is enabled or not |

### tickColor

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

```
@Composable
fun tickColor(enabled: Boolean, active: Boolean): State<Color>
```

Represents the color used for the sliders's tick which is the dot separating steps, if they are set on the slider, depending on `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#tickColor(kotlin.Boolean,kotlin.Boolean)` and `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#tickColor(kotlin.Boolean,kotlin.Boolean)`.

Active tick is the tick that is in the part of the track filled with progress, so if sliders progress is 30% out of 100%, left (or right in RTL) 30% of the track and the ticks in this 30% will be active, the rest is not active.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the `https://developer.android.com/reference/kotlin/androidx/compose/material/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.SliderColors)` is enabled or not |
| `active: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the part of the track this tick is in is active of not |

### trackColor

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

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

Represents the color used for the sliders's track, depending on `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#trackColor(kotlin.Boolean,kotlin.Boolean)` and `https://developer.android.com/reference/kotlin/androidx/compose/material/SliderColors#trackColor(kotlin.Boolean,kotlin.Boolean)`.

Active part is filled with progress, so if sliders progress is 30% out of 100%, left (or right in RTL) 30% of the track will be active, the rest is not active.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the `https://developer.android.com/reference/kotlin/androidx/compose/material/Slider.composable#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.SliderColors)` is enabled or not |
| `active: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the part of the track is active of not |