This thread came up in channel, and wasn't ready for primetime. The MOD 14 returns 0-13, so adding 2 changes the colors to be color index 2-15. This excludes both white and black, one of which is pretty much guaranteed to be a good color and the other one bad. But it also includes colors that may not contrast well against blackgrounds and whitegrounds unless you edit your color palette. i.e. 8=yellow vs 0-white or 2-navy vs 1-black.

This modified code instead lets you choose a list of colors that work well against the background. With the newer mIRC versions you can use colors 0-98, but for older versions you'd need to stick with the old 0-15 range. However many numbers you list, that's the number you replace the '16' with.

I also changed from MD5 to CRC, which is a faster algorithm, and avoids the need to use $left(). This should be sufficient to diversify similar strings among various colors, and would be slightly quicker, since this is executing for each message in channel.

The 'secret' is optional, and can be changed later if you want to stir the colors so some people no longer share a color.

If you want the color to follow someone as they change nick, replace $nick with $address. The color can change if they reconnect with a different IP address or if their identd state changes. Using $site would put clones as the same color, including all *@staff.network addresses.

Code:
on ^*:TEXT:*:# { 
var %col $gettok(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15,$calc(1+$base($crc(secret $nick,0),16,10) % 16),32)
echo -tl $chan < $+ $chr(3) $+ %col $+ $nick($chan,$nick).pnick $+ $chr(3) $+ > $1- 
  halt
}



To get fancier, you can make the coloring change every 24 hours, using the $randnow2 alias at https://mircscripts.net/j6hi0 to replace the 'var' line with:

Code:
var %col $gettok(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15,$randnow2(1,1,16,16,86400,secret $nick),32)



Both 16's need to change to the count of numbers in your number list. 86400 is the number of seconds in a day, so change it if you want it to change weekly or otherwise.