Alright, I see the reason for both, now. I just got thrown off by the talk about "the color used by the last message" instead of just looking up the color once you have the chat type.
Incidentally, what is the chat type of a message that gets added like this?
Code:
DEFAULT_CHAT_FRAME:AddMessage("Hello, world.")
Does is it end up as "SAY", even though it isn't?
@Phanx
After
ChatTypeGroup is defined, a reverse lookup table is created called
ChatTypeGroupInverted. Couldn't that be used instead of the one you created in your code? The output is the key into
ChatTypeInfo, so I assume it could be.