---
title: textColor
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextfield/textcolor
---

# textColor

The color of the text field’s content.

## Declaration

```swift
@NSCopying var textColor: NSColor? { get set }
```

## Discussion

Discussion note: When the text field has an attributed string value, the system ignores the textColor, font, alignment, lineBreakMode, and lineBreakStrategy properties. Set the foregroundColor, font, alignment, lineBreakMode, and lineBreakStrategy properties in the attributed string instead.

## See Also

### Related Documentation

- [backgroundColor](appkit/nstextfield/backgroundcolor.md)
- [textColor](appkit/nstextfieldcell/textcolor.md)
