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