moving color variables into a function

... to avoid variable naming conflicts