CVar colorChatNamesByClass

This CVar changes how the chat log is displayed. Instead of the names of people speaking being the same color as their text, their name will change to a color to match their class.

Default Setting

 * 0

Possible Settings

 * 0 :Name of person and chat text all 1 color
 * 1 :Name of person is a different color based on their class

If enabled
If this setting is on, the following happens
 * Death Knight's Name : Text
 * Druid's Name : Text
 * Hunter's Name : Text
 * Mage's Name : Text
 * Paladin's Name : Text
 * Priest's Name : Text
 * Rogue's Name : Text
 * Shaman's Name : Text
 * Warlock's Name : Text
 * Warrior's Name : Text

Changing this setting
You can change this setting via the Interface settings.

or

In-game, type the following /console colorChatNamesByClass setting

or

You can exit wow, open the Config-cache.wtf file, and add the following line: SET colorChatNamesByClass setting