You can apply paragraph background colors to text contents in headers, footers, body and other scopes of the document. MS Word doesn't include a content/tag/style to apply a background color to headers or footers that fill the whole header/footer; only to the whole document (as setBackgroundColor does).
To set background colors to headers and footers You need to add contents such as a shape or a table or an image:
We recommend you generate a DOCX template with the needed content and use it with the CreateDocxFromTemplate class. Using DOCXCustomizer, available in Premium licenses, you can customize existing styles in DOCX documents dynamically; for example to customize the color applied to a shape.