Cookie example of color change

document.getElementById(“color”).value = array[1] this command is not working