I have a color input like this
function setstyle(elm, val) {
elm.style.color = val;
}
<input type="color" name="fontcolor" id="fontcolor" value="#ffffff" onchange="setstyle('usermsg',this.value);">
when you choose a color this will automatically change the style in a separate text area. However, despite the input is in hex, it will always output it as RGB which I don't need. How can I fix that so it adds the equivalent hex value?
fiddle: https://jsfiddle.net/1a23t6w0/