JSFiddle - React, Tailwind, and code Playground
HTML
<input type="color" id="renk" />
<div id="kutu"></div>
CSS
#kutu
{
width:100px;
height:100px;
background-color:#000;
margin-top:10px;
}
JavaScript
$(document).ready(function(e) {
$("#renk").change(function(){
var renk = $(this).val(); //secilen rengı aldık degıskene atadık
$("#kutu").css({ //Ardından id'si kutu olan div'in css ile background rengını degıstırdık
"background-color":renk
});
});
});