Definir protetores de cor de beckground stange

// Change it to red
canvas.style.backgroundColor = "#ff0000";

// Change it to the value of a text input
canvas.style.backgroundColor = document.getElementById("myTextInput").value;
Scary Stag