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

# setColor(_:)

Changes the tint color of the switch when it is on.

## Declaration

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

## Parameters

- `color`: The tint color to use for the switch. Specify nil to use the default switch color.

## See Also

### Configuring the Switch

- [setOn(_:)](watchkit/wkinterfaceswitch/seton(_:).md)
