Well, we have a big old post on it, but the current thought goes like this:
(1) Certain nicknames always generate colors. Check ign's guide for this: said nicknames are inevitably lame.
(2) The first two characters appear to be extremely important. In many cases, a "series" of colors will be generated from this.
(3) In at least some cases, the OT# has been very important, and having it vary by as much as a single bit has resulted in a monster with very striking colors returning to normal.
I can't speak with confidence, but it looks as though the color thing is a lot more complex than thought (at least by me) initially.
"Thanks for deleting the post, cfalcon!"