---
title: foregroundColor
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextstorage/foregroundcolor
---

# foregroundColor

The color for the text.

## Declaration

```swift
var foregroundColor: NSColor? { get set }
```

## Discussion

Discussion Unless you’re dealing with scriptability, you shouldn’t use or modify this property directly.

## See Also

### Accessing scriptable properties

- [attributeRuns](appkit/nstextstorage/attributeruns.md)
- [paragraphs](appkit/nstextstorage/paragraphs.md)
- [words](appkit/nstextstorage/words.md)
- [characters](appkit/nstextstorage/characters.md)
- [font](appkit/nstextstorage/font.md)
