<!--
{
  "availability" : [
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKInterfaceTextField/setTextColor(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKInterfaceTextField(im)setTextColor:"
  },
  "title" : "setTextColor(_:)"
}
-->

# setTextColor(_:)

Sets the text’s color.

```
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

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 <doc://com.apple.documentation/documentation/UIKit/NSForegroundColorAttributeName> attribute.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)