---
title: textBackgroundColor
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nscolor/textbackgroundcolor
---

# textBackgroundColor

The color to use for the background area behind text.

## Declaration

```swift
class var textBackgroundColor: NSColor { get }
```

## Discussion

Discussion When text is selected, its background color changes to the return value of selectedTextBackgroundColor. When applied to an NSBox object, this color supports Desktop Tinting in Dark Mode. With Desktop Tinting, the system modifies this color dynamically by incorporating some of the color from the underlying desktop image. The system does not apply this dynamic tinting effect to other types of views.

## See Also

### Text colors

- [textColor](appkit/nscolor/textcolor.md)
- [placeholderTextColor](appkit/nscolor/placeholdertextcolor.md)
- [selectedTextColor](appkit/nscolor/selectedtextcolor.md)
- [selectedTextBackgroundColor](appkit/nscolor/selectedtextbackgroundcolor.md)
- [keyboardFocusIndicatorColor](appkit/nscolor/keyboardfocusindicatorcolor.md)
- [unemphasizedSelectedTextColor](appkit/nscolor/unemphasizedselectedtextcolor.md)
- [unemphasizedSelectedTextBackgroundColor](appkit/nscolor/unemphasizedselectedtextbackgroundcolor.md)
