<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableRowView/backgroundColor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableRowView(py)backgroundColor"
  },
  "title" : "backgroundColor"
}
-->

# backgroundColor

The background color of the row.

```
@NSCopying var backgroundColor: NSColor { get set }
```

## Discussion

The property defaults to the table view’s [`backgroundColor`](/documentation/AppKit/NSTableView/backgroundColor), unless [`usesAlternatingRowBackgroundColors`](/documentation/AppKit/NSTableView/usesAlternatingRowBackgroundColors) is set to <doc://com.apple.documentation/documentation/Swift/true>. In that case, the colors alternate, and are automatically updated as required by insertions and deletions.

The value of the background color can be customized in the `NSTableViewDelegate` method `tableView:didAddRowView:forRow:`. The property is animatable.

---

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)