JSFiddle - React, Tailwind, and code Playground
HTML
<div>text</div><button>text</button>
JavaScript
$("button").click(function(){
var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
$("div").css("color",hue);
})