JSFiddle - React, Tailwind, and code Playground
HTML
<div class="rotator">background</div>
JavaScript
var colors = ["rgba(86,175,99,0.6)", "rgba(86,175,222,0.6)", "rgba(0,0,0,0.6)"];
jQuery(".rotator").click(function() {
var randomColor = colors[Math.floor(Math.random() * colors.length)];
jQuery('body').css("background", randomColor);
});