SliderColors

Class

Common
class SliderColors(
    val thumbColor: Color,
    val activeTrackColor: Color,
    val activeTickColor: Color,
    val inactiveTrackColor: Color,
    val inactiveTickColor: Color,
    val disabledThumbColor: Color,
    val disabledActiveTrackColor: Color,
    val disabledActiveTickColor: Color,
    val disabledInactiveTrackColor: Color,
    val disabledInactiveTickColor: Color,
)

Represents the color used by a Slider in different states.

Parameters

thumbColorthumb color when enabled
activeTrackColorcolor of the track in the part that is "active", meaning that the thumb is ahead of it
activeTickColorcolors to be used to draw tick marks on the active track, if steps is specified
inactiveTrackColorcolor of the track in the part that is "inactive", meaning that the thumb is before it
inactiveTickColorcolors to be used to draw tick marks on the inactive track, if steps are specified on the Slider is specified
disabledThumbColorthumb colors when disabled
disabledActiveTrackColorcolor of the track in the "active" part when the Slider is disabled
disabledActiveTickColorcolors to be used to draw tick marks on the active track when Slider is disabled and when steps are specified on it
disabledInactiveTrackColorcolor of the track in the "inactive" part when the Slider is disabled
disabledInactiveTickColorcolors to be used to draw tick marks on the inactive part of the track when Slider is disabled and when steps are specified on it

Functions

fun copy(
        thumbColor: Color = this.thumbColor,
        activeTrackColor: Color = this.activeTrackColor,
        activeTickColor: Color = this.activeTickColor,
        inactiveTrackColor: Color = this.inactiveTrackColor,
        inactiveTickColor: Color = this.inactiveTickColor,
        disabledThumbColor: Color = this.disabledThumbColor,
        disabledActiveTrackColor: Color = this.disabledActiveTrackColor,
        disabledActiveTickColor: Color = this.disabledActiveTickColor,
        disabledInactiveTrackColor: Color = this.disabledInactiveTrackColor,
        disabledInactiveTickColor: Color = this.disabledInactiveTickColor,
    ) =
        SliderColors(
            thumbColor.takeOrElse { this.thumbColor },
            activeTrackColor.takeOrElse { this.activeTrackColor },
            activeTickColor.takeOrElse { this.activeTickColor },
            inactiveTrackColor.takeOrElse { this.inactiveTrackColor },
            inactiveTickColor.takeOrElse { this.inactiveTickColor },
            disabledThumbColor.takeOrElse { this.disabledThumbColor },
            disabledActiveTrackColor.takeOrElse { this.disabledActiveTrackColor },
            disabledActiveTickColor.takeOrElse { this.disabledActiveTickColor },
            disabledInactiveTrackColor.takeOrElse { this.disabledInactiveTrackColor },
            disabledInactiveTickColor.takeOrElse { this.disabledInactiveTickColor },
        )

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