When the user chose a colour in the colour picker.
How can I get the colour value and output in the console?
The color is as
<!DOCTYPE HTML>
<HTML>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
</head>
<body>
<label for="color">Please chose a color </label>
<input type="color" id="color" name="color2">
<script>
let userColor= document.querySelector("#color").value
console.log(userColor)
</script>
</body>
</html>