---
title: "setTextColor(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacetextfield/settextcolor(_:)"
---

# setTextColor(_:)

Sets the text’s color.

## Declaration

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

## Parameters

- `color`: The color to be applied to the text field’s text. Specifying nil removes the color and returns the text to the color specified in the storyboard file. The default color is white.

## Discussion

Discussion This method defines the default color of the entire string. The text field uses this color unless you explicitly override it in an attributed string using the NSForegroundColorAttributeName attribute.

## See Also

### Setting the Text

- [setText(_:)](watchkit/wkinterfacetextfield/settext(_:).md)
- [setAttributedText(_:)](watchkit/wkinterfacetextfield/setattributedtext(_:).md)
