The different colors are different species, and the different coloration may help them to take advantage of the various depths/lighting levels at which they are found. So I believe its mostly a light factor, but a pink caoraline isnt going to to turn red beacause the lighting changed, The red is just going to outcompete and grow over the pink.
Here's what I notice in my tanks
Green coraline - low light, generally a first colonizer
Red Coraline - low light
Purple coraline - Variable lighting, but generally moderate
Pink coraline - High light, or high K, seems to prefer smooth surfaces like tank walls for some reason.
The greens and reds dont usually stick around long and are easily outcompeted by pinks and purples at least under the conditions we generally keep in our tanks.
Lighting color, or Kelvin may also play a role here.
Greens and reds seem to prefer lower K, and pinks and purples seem to prefer higher K, but this kinda goes back to light intensity.