3D Render With JS

I have a 3D Render of moving cubes, they are different colors, so it’s like a rainbow. But I want to know if there is a way to make the squares pulse colors. https://repl.it/@AlexanderLuna/R-A-I-N-B-O-…