NSForegroundColorAttributeName
The color of the text.
Declaration
extern NSAttributedStringKey NSForegroundColorAttributeName;Discussion
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.
See Also
Getting rendering attribute keys
NSBackgroundColorAttributeNameNSBaselineOffsetAttributeNameNSFontAttributeNameNSGlyphInfoAttributeNameNSKernAttributeNameNSLigatureAttributeNameNSParagraphStyleAttributeNameNSStrikethroughColorAttributeNameNSStrikethroughStyleAttributeNameNSStrokeColorAttributeNameNSStrokeWidthAttributeNameNSSuperscriptAttributeNameNSTrackingAttributeNameNSUnderlineColorAttributeNameNSUnderlineStyleAttributeName