JSFiddle - React, Tailwind, and code Playground
HTML
<div id="divcol" style="width:150px;height:150px;background-color:#c3c3c3;">
</div>
JavaScript
var possible = 'ABCDEF123456';
var stringLength = 6;
$('#divcol').on('mousemove',function(){
var randomString = Array.apply(null, new Array(stringLength)).map(function () {
return possible[Math.floor(Math.random() * possible.length)];
}).join('');
var col = "#"+randomString;
$(this).delay(10000).css("background-color",col);
})