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

# backgroundStyle

The cell’s background style.

```
var backgroundStyle: NSView.BackgroundStyle { get set }
```

## Discussion

The background describes the surface the cell is drawn onto in the [`draw(withFrame:in:)`](/documentation/AppKit/NSCell/draw(withFrame:in:)) method. A control typically sets the value of this property before it asks the cell to draw. A cell may draw differently based on background characteristics. For example, a table view drawing a cell in a selected row might set the value to [`dark`](/documentation/AppKit/NSView/BackgroundStyle/dark). A text cell might decide to render its text white as a result. A rating-style level indicator might draw its stars white instead of gray.

---

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)