---
title: backgroundColor
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsimage/backgroundcolor
---

# backgroundColor

The background color for the image.

## Declaration

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

## Discussion

Discussion The background color is visible only if the drawn image representation does not completely cover all of the pixels available for the image’s current size.  The background color is ignored for cached image representations; such caches are always created with a white background. Assigning a new background color does not cause the receiver to recache itself. The default color is transparent, as returned by the clear method of NSColor.

## See Also

### Related Documentation

- [recache()](appkit/nsimage/recache().md)

### Managing Drawing Options

- [isValid](appkit/nsimage/isvalid.md)
- [capInsets](appkit/nsimage/capinsets.md)
- [resizingMode](appkit/nsimage/resizingmode-swift.property.md)
- [NSImage.ResizingMode](appkit/nsimage/resizingmode-swift.enum.md)
