Chances are the colors come from embedded ansi escape sequences. If so, you could fairly easily use sed to change or remove them. Try piping the script through cat -v to see what non-printing characters exist in the output. For example, if I run ls through it with colors on, I get:
Code:
$ ls --color|cat -v
^[[0m^[[01;32mscript1.sh^[[0m
^[[01;32mscript2.sh^[[0m
file.txt
^[[01;34mtest^[[0m
^[[01;34mvarious_scripts^[[0m
"^[[01;34m", for example, is the escape sequence for bright blue. The ^[ at the beginning is a graphical representation of a literal ascii escape character, (in the script code it will probably be represented as \e). The numbers between the second [ and the m are the modes that set the display colors. Multiple modes are strung together with semicolons.
This page lists the possible codes. You'll want the "set graphics mode" section.
So to change the blue to red, for example, simply change the number with sed.
Code:
ls --color|sed 's/;34/;31/g'
To remove all the color codes, you can use an expression like this (I found this on the net, so it may not remove every code possible, but it should work for most of the common ones). Note that the escape has to be matched using the hex value.
Code:
sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g"
Hopefully this will help you.
Regarding your second question, I think we'd need to see the actual code to figure out what's going on.