JSFiddle - React, Tailwind, and code Playground

HTML

<div class="info" style="background: #408FCE;">
    <div class="infobox">
        tags
    </div>
</div>

JavaScript

$('.infobox').each(function(index, element) {
        $(this).css({
			color : $(this).parent().css('background-color')
		})
    });