JSFiddle - React, Tailwind, and code Playground

by fxi

HTML

<input type="color" id="c">
<span id="x"></span>

JavaScript

c.addEventListener('input',update)

function update(e){
  x.innerText=c.value
}
update()