At least for the color red, my theory is that it is from iron in the rock. But how come sometimes you will see a red circle? Maybe from tiny organisms that excrete iron? I'm no scientist, maybe someone out there knows for sure.
Sometimes you come across potholes and they will be colored red from where the water was sitting in for a while. That is what leads me to believe it may be from algea or lichens or something. But then again I have seen a very similar solid red or orange circles on a verticle rock face.
Formation of ball and ellipsoid like precipitate zones of iron could probably cause the round red balls. I see them all over Red Rock in NV. I have one that I brought home that is a perfect 2" sphere. There's a climb in Red Rocks that has these round red balls sticking out of the rock everywhere.