Что-то такое придумал
let clock = document.querySelector('.clock');
let arrColors = ['rgba(255, 0, 0, .1)','rgba(255, 0, 0, .2)','rgba(255, 0, 0, .3)','rgba(255, 0, 0, .4)','rgba(255, 0, 0, .5)','rgba(255, 0, 0, .6)', 'rgba(255, 0, 0, .7)', 'rgba(255, 0, 0, .8)','rgba(255, 0, 0, .9)', 'rgba(255, 0, 0, 1)'];
const changeColor = (color, delay) => {
clock.style.filter = `drop-shadow(0 0 14px ${color})`;
return new Promise((resolve) => setTimeout(resolve, delay));
}
setInterval(async function(func){
for(let i = 0; i < arrColors.length; i++){
await func(arrColors[i], 2000);
}
}, arrColors.length * 2000, changeColor);