---
title: "setColor(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfaceslider/setcolor(_:)"
---

# setColor(_:)

Sets the color of the slider bar.

## Declaration

```swift
func setColor(_ color: UIColor?)
```

## Parameters

- `color`: The custom color to be applied to the slider bar. Specifying nil removes the custom color and returns the slider to the color specified in the storyboard file. The default slider bar color is green.

## See Also

### Setting the Slider Value

- [setValue(_:)](watchkit/wkinterfaceslider/setvalue(_:).md)
- [setNumberOfSteps(_:)](watchkit/wkinterfaceslider/setnumberofsteps(_:).md)
