JavaScript set la couleur en hex

element = document.querySelector("div");
element.style.backgroundColor = "#242424";
Glamorous Gull