For some reason or other, I've never thought about changing my prompt's color, but I have changed my CPAN prompt(see:
Trick or Treat). Here's the easiest way that I know to change the bash prompt color using perl:
#!/usr/bin/perl
use strict;
use warnings;
use ExtUtils::MakeMaker qw(prompt);
prompt("export PS1=\e[0;31m\][\\u@\\H\\W\]\$\\e]m");
When you run it, it'll change the color to red, then it'll appear to hang. Actually, as with any command, bash is waiting for
<enter>. To get back to your former color, just exit the terminal and start another one.