The easiest way I see of doing this is using this code, and just putting in all the membergroups. Which shouldn't take long.
<script>
function color_group_name() {
//Created by Agent Moose (smcodes.smfforfree3.com)
var group = new Array()
group[group.length] = ["Newbie","orange"]
group[group.length] = ["MEMBER GROUP","COLOR"]
for(f=0;f<group.length;f++){
$("div.smalltext").each(function() {
if(this.innerHTML.match(group[f][0])){
this.innerHTML = this.innerHTML.replace(group[f][0],"<font color='" + group[f][1] + "'>" + group[f][0] + "</font>");
};});};}
color_group_name();
</script>
And just put in all the membergroups rather than each individual member.