Set background color of canvas with html2canvas

I’m using html2canvas to take screenshots from elements in a page

html2canvas(element).then(canvas => canvas.toDataURL());

Works find, but the only thing that goes wrong is that the background color of the page is ignored. Is there a way to fix this in html2canvas or to define a background color?