<h1>Vælg en farve</h1> <form> <label for="color">Farve</label> <input id="color" type="color" /> </form>
const heading = document.querySelector("h1");
const colorInput = document.querySelector("#color");
function updateHeadingColor() {
heading.style.color = colorInput.value;
}
colorInput.addEventListener('input', updateHeadingColor);