In the following code how to get the name of the color when the user submits the form.
<script>
function showColor(){
alert(document.getElementById('color').value);
}
</script>
<form action="" onsubmit="showColor()">
<input type="color" id="color" value="#000000">
<input type="submit">
</form>