<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColor/textBackgroundColor",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColor(cpy)textBackgroundColor"
  },
  "title" : "textBackgroundColor"
}
-->

# textBackgroundColor

The color to use for the background area behind text.

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

## Discussion

When text is selected, its background color changes to the return value of [`selectedTextBackgroundColor`](/documentation/AppKit/NSColor/selectedTextBackgroundColor).

When applied to an [`NSBox`](/documentation/AppKit/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)