How did they do this?

I have been trying to figure out how they did this.

Any ideas?

They probably filmed real colored fluids and sand, defined a small clip and added to it its reversed duplicated to create a loop.

xparticles for C4D can do that

Reaction diffusion patterns with some hack

Here’s another video of a similar effect mixed with CG (and nice music!) Both this and your video look more like they are done with real fluids than a simulation.

playing with procedural texture and coordinates distortion can give you some pretty interesting effect :wink:
I am not saying that’s how they achieved what you posted, but I believe you can get some nice abstract effect playing around with those things I mentioned above

This kind of effects have been done with cloud tanks, optics and other nifty methods for ages. These days its not so certain anymore but as others, I’d incline towards practical effect.