foregroundColor
The color of the text.
Declaration
static let foregroundColor: NSAttributedString.KeyDiscussion
In macOS, the value of this attribute is an NSColor instance. In iOS, tvOS, watchOS, and Mac Catalyst, the value of this attribute is a UIColor instance. Use this attribute to specify the color of the text during rendering. If you don’t specify this attribute, the text renders in black.