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

# setBackgroundColor(_:)

Sets the background color of the annotation text field.

## Declaration

```swift
func setBackgroundColor(_ color: NSColor!)
```

## Parameters

- `color`: The color to be used in the background of the annotation’s text field.

## See Also

### Related Documentation

- [PDFAnnotationTextWidget](pdfkit/pdfannotationtextwidget.md)

### Managing Background Color, Alignment, and Rotation

- [backgroundColor()](pdfkit/pdfannotationtextwidget/backgroundcolor().md)
- [alignment()](pdfkit/pdfannotationtextwidget/alignment().md)
- [setAlignment(_:)](pdfkit/pdfannotationtextwidget/setalignment(_:).md)
- [rotation()](pdfkit/pdfannotationtextwidget/rotation().md)
- [setRotation(_:)](pdfkit/pdfannotationtextwidget/setrotation(_:).md)
