Well, I probably can't help much with the first two. If you don't know perl, you'll likely not enjoy trying to read the script. If you try to really read the C code it spits out, you'll find it mostly large chunks of data since the point was to generate something that worked FAST, knowing that RAM is cheap these days.
As for the symbolic color code... that really is pretty simple.
If you look in the SmaugFUSS distro, you'll see my name in some comments down somewhere in color.c, and somewhere in the code that parses the color tokens, you'll see that it treats codes like ^[ or &[ as special things. Namely, it reads whatever comes after the [ up until it sees a matching ], and looks THAT up in a table to see what actual color you wanted.
So, while &r might be red, you can also get the same ANSI sequence output with &[red], and if you define your lookup table right, you could do &[damage] and have that also end up as red.
Why? Because it lets you avoid hard-coding stuff in the rest of your code. If you use &[damage] for things that cause the player damage, the player themselves can have the option to specify what color those messages actually show up as... perhaps they're color-blind, or perhaps they simply don't like red, or maybe they play on a white background and want it to be bold+red or something.
So, using that same system, you could implement a bit more hackery and allow xterm256 color names to emit xterm256 specific sequences (or downcode to ANSI if not supported).