JSFiddle - React, Tailwind, and code Playground
HTML
<div id="quotation" onclick="display()">text</div>
JavaScript
function display() {
var colours = new Array();
colours[0] = "red";
colours[1] = "blue";
colours[2] = "green";
colours[3] = "lime";
colours[4] = "teal";
var b = Math.floor(Math.random()*colours.length);
document.getElementById("quotation").style.color = colours[b];
}