Is it possible to convert HTML to an image with a background-color?

I am trying to generate an image using shortcuts with an HTML file as its base-template. All the lay-outs are correct, but the background-colors get dismissed by Shortcuts when turning the HTML into an image, or rtf to a pdf. Does somebody know a workaround to get a black background for an image?

I have a sample shortcut which shows this happening using two different methods.

https://www.icloud.com/shortcuts/1b5eb8b988084d68871ec3ac8f671b89