JSFiddle - React, Tailwind, and code Playground
HTML
<select id="doc1" style="background-color: #D86666">
<option value="red" style="background-color:#D86666">REQUIERE</option>
<option value="green" style="background-color:#009966">OPCIONAL</option>
<option value="purple" style="background-color:#9966FF">EXCEPCIÓN</option>
<option value="grey" style="background-color:#989898">NO TRABAJA</option>
</select>
JavaScript
$(document).ready(function(){
$("#doc1").change(function(){
var newcolor=$(this).children("option:selected").css("background-color");
$(this).css("backgroundColor", newcolor);
});
});