alias uccolorize {
var %r,%q = $regsub($1-,/([A-Z]+(?: +[A-Z]+)*)/g,4\1,%r) $regsub(%r,/([a-z]+(?: +[a-z]+)*)/g,15\1,%r)
if ($isid) return %r
else msg $active $1-
}
This will make all upper case letters be in color 4 and all lower case letters in color 15. You need to replace that by a \1 in the correct color, with a ctrl-o at the end to prevent the next characters from being colored too. Note that this script will not (way less anyways) put color codes around each and every letter even if it's already the right color.
It can have strange results if you combine this with text that already has colors or other codes in it.
If you want to convert output of scripts, put that like $uccolorize(Output To Change)
If you want to have the sext you're going to say to a channel converted, use /uccolorize this is what I want to say, but NOw in CoLoR.
In the last case, you might want to go for a shorter alias name, or use an on INPUT event trigger to do it for you...