JSFiddle - React, Tailwind, and code Playground
HTML
<div contenteditable="true" id="selector" style="background-color: rgb(255,255,0);">
Test background color.
</div>
JavaScript
$('div#selector').on('mouseup', function (){
alert($(this).css('color'));
});