---
title: NSBackgroundColorAttributeName
framework: appkit
role: symbol
role_heading: Global Variable
path: appkit/nsbackgroundcolorattributename
---

# NSBackgroundColorAttributeName

The color of the background behind the text.

## Declaration

```occ
extern NSAttributedStringKey NSBackgroundColorAttributeName;
```

## Discussion

Discussion The value of this attribute is a UIColor object. Use this attribute to specify the color of the background area behind the text. If you do not specify this attribute, no background color is drawn.

## See Also

### Getting rendering attribute keys

- [NSBaselineOffsetAttributeName](appkit/nsbaselineoffsetattributename.md)
- [NSFontAttributeName](appkit/nsfontattributename.md)
- [NSForegroundColorAttributeName](appkit/nsforegroundcolorattributename.md)
- [NSGlyphInfoAttributeName](appkit/nsglyphinfoattributename.md)
- [NSKernAttributeName](appkit/nskernattributename.md)
- [NSLigatureAttributeName](appkit/nsligatureattributename.md)
- [NSParagraphStyleAttributeName](appkit/nsparagraphstyleattributename.md)
- [NSStrikethroughColorAttributeName](appkit/nsstrikethroughcolorattributename.md)
- [NSStrikethroughStyleAttributeName](appkit/nsstrikethroughstyleattributename.md)
- [NSStrokeColorAttributeName](appkit/nsstrokecolorattributename.md)
- [NSStrokeWidthAttributeName](appkit/nsstrokewidthattributename.md)
- [NSSuperscriptAttributeName](appkit/nssuperscriptattributename.md)
- [NSTrackingAttributeName](appkit/nstrackingattributename.md)
- [NSUnderlineColorAttributeName](appkit/nsunderlinecolorattributename.md)
- [NSUnderlineStyleAttributeName](appkit/nsunderlinestyleattributename.md)
