---
title: "setBackgroundColor(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacegroup/setbackgroundcolor(_:)"
---

# setBackgroundColor(_:)

Changes the background color for the group container.

## Declaration

```swift
func setBackgroundColor(_ color: UIColor?)
```

## Parameters

- `color`: The solid background color to be displayed behind all items in the group. Specify nil to remove the custom color you previously set using this method.

## Discussion

Discussion If you do not specify a custom background color or if you set the custom color to nil, the group uses the color assigned to the group object in your storyboard file. The default background color is clear. If you set a custom background image for the group, the image is displayed on top of the background color. If the image contains any transparency, the background color shows through the transparent portions of the image. Changes to the background color of a group are animatable.

## See Also

### Related Documentation

- [App Programming Guide for watchOS](apple-archive/documentation/General/Conceptual/WatchKitProgrammingGuide.md)

### Setting the Group’s Content

- [setBackgroundImage(_:)](watchkit/wkinterfacegroup/setbackgroundimage(_:).md)
- [setBackgroundImageData(_:)](watchkit/wkinterfacegroup/setbackgroundimagedata(_:).md)
- [setBackgroundImageNamed(_:)](watchkit/wkinterfacegroup/setbackgroundimagenamed(_:).md)
