setInterval(() => { const here = Math.random() * 100; if (85 < here && here < 90) { return window.location.reload(); } const rando = () => ~~(Math.random() * 255); const [r, g, b] = Array(3).fill('').map(rando); const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; const color = [r, g, b].reduce((s, n) => s + n.toString(16), '#'); const textColor = 128 < yiq ? 'black' : 'white'; console.log('%cnaw, waiting ', `background-color: ${color}; color: ${textColor};`); }, 1030);