JSFiddle - React, Tailwind, and code Playground
HTML
<span class="swatch" style="background-color: #d1f2a5;"><strong>paste here</strong><em></em></span>
JavaScript
var strong = $('span.swatch > strong');
strong.html(strong.parent().css('background-color'));