Should be able to get it with document.onclick as long as nobody stops propagation before the click gets there.
Try it:
https://jsfiddle.net/hq0c2604/1/
Codes:
html code
<body>
<p>Hi this is a page.</p>
<p><button onclick='alert("LOL")'>LOL</button></p>
<p><a href='javascript:void(alert("Ow!"))'>Don't touch!</a></p>
</body>
javascript code
document.onclick = function(){
color = Math.floor(Math.random()*0xffffff).toString(16);
while(color.length < 6)
color = "0" + color;
document.body.style.backgroundColor = "#" + color;
};