<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContextualAction/backgroundColor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIContextualAction(py)backgroundColor"
  },
  "title" : "backgroundColor"
}
-->

# backgroundColor

The background color of the action button.

```
@NSCopying var backgroundColor: UIColor! { get set }
```

## Discussion

The default value of this property is determined by the value of the [`style`](/documentation/UIKit/UIContextualAction/style-swift.property) property, which determines the default appearance of the button. Assigning a new color to this property changes the background to the color that you specify.

---

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)