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

# backgroundColors

An array containing the collection view’s background colors.

```
var backgroundColors: [NSColor]! { get set }
```

## Discussion

This property contains an array of [`NSColor`](/documentation/AppKit/NSColor) objects, representing the colors to use when drawing the background grid. Specifying an empty array or `nil` causes the collection view to use the default colors returned by the [`controlAlternatingRowBackgroundColors`](/documentation/AppKit/NSColor/controlAlternatingRowBackgroundColors) method.

When a background view is specified for the collection view, the colors in this property are ignored.

---

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)