<body> Привет мир!
<script>
var colors = [1, 'olive', 'yellow', 'teal', 'lime', 'green', 'aqua', 'blue', 'red', 'purple', 'black'];
function nextColor () {
document.body.style.color = colors[colors[0]];
colors[0] += 1;
if (colors[0] == colors.length) colors[0] = 1;
}
setInterval(nextColor, 1000);
</script>
</body>