Hello, Welcome to the site!
If the green just started developing while you were away, and slimy to the touch...it is most likely is the start of hair algae. = BAD
The purple on the rock if it developed while you were away, and is slimy to the touch, is most likely Cyanobacteria, not an algae at all. = BAD
If the algae came on the rock, or is hard and crusty it is most likely Coralline algae... = GOOD
Coralline comes in a variety of colors, the yellow turns green, the pink turns purple, the orange will turn red. It's a hard as rock algae, and won't scrape off easy with your nail. It also takes time to develop, and usually starts in a spot and spreads from there, having it all over all at once is a sign it isn't coralline.
The solution is water changes ... If you use tap water, and not RO (reverse osmosis) for your salt mix, the bad types of algae will go crazy growing. Tap water just creates nightmare algae problems. I see this is a reef, so you should have test kits, test Nitrates and Phosphates, the bad algae needs that to feed on and grow. Keeping those as near to 0 as possible, will prevent bad/nuisance algae growth.