---
title: foregroundColor
framework: quartzcore
role: symbol
role_heading: Instance Property
path: quartzcore/catextlayer/foregroundcolor
---

# foregroundColor

The color used to render the receiver’s text. Animatable.

## Declaration

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

## Discussion

Discussion Defaults to opaque white. The foregroundColor property is only used when the string property is not an NSAttributedString. note: Implicit animation of this property is only enabled in applications compiled for macOS 10.6 and later.

## See Also

### Text Visual Properties

- [font](quartzcore/catextlayer/font.md)
- [fontSize](quartzcore/catextlayer/fontsize.md)
- [allowsFontSubpixelQuantization](quartzcore/catextlayer/allowsfontsubpixelquantization.md)
