Download
(12 Kb)
Download
Updated: 03-31-14 08:23 PM
Pictures
File Info
Compatibility:
Siege of Orgrimmar (5.4)
Updated:03-31-14 08:23 PM
Created:02-13-09 02:58 PM
Downloads:10,965
Favorites:144
MD5:
5.4
Class Colors  Popular! (More than 5000 hits)
Version: 5.4.7.94
by: Phanx [More]
Class Colors lets you change class colors without breaking parts of the Blizzard UI.
Class Colors erlaubt das Ändern der Klassenfarben ohne Interferenzen mit dem Blizzard UI.
Cambiar los colores de clase sin romper la interfaz de usario de Blizzard.
Mudar as cores de classes sem quebrar a interface do usuário da Blizzard.

It is supported by many popular addons, and also applies your custom colors to all parts of the Blizzard UI that are normally class-colored. If you want to colorize more parts of the Blizzard UI, check out yClassColors by yleaf.

Type “/classcolors” for options, or open the Class Colors panel in the Interface Options window.

Language Support

Works in all languages. The in-game help text is translated into English, Deutsch, Español, and Português. If you can provide translations for another language, please post a comment.

Feedback

To report a bug, please make sure you have the latest version from this page, and then submit a ticket. Be sure to include detailed instructions I can follow to reproduce the bug myself; the exact text of the error message if there is one; and a screenshot if you think it may help.

For general comments or questions, post a comment.

How to make your addon support Class Colors

Basically, any time your addon would read a value from the RAID_CLASS_COLORS table, just look for a CUSTOM_CLASS_COLORS table and read from it instead.

If your addon uses a local upvalue for RAID_CLASS_COLORS, or builds a local cache table of class colors, you should update your upvalue or cache in response to the PLAYER_LOGIN event, and register for a callback to be notified when the user changes a class color.

Please do not check for the !ClassColors addon by name — eg. with GetAddOnInfo or IsAddOnLoaded — or set !ClassColors as a dependency for your addon. Use the methods described above.

See see the CUSTOM_CLASS_COLORS documentation for more details!
Version 5.4.7.94
  • Updated chat player name coloring for realm name changes in WoW 5.4.7

Version 5.4.2.90
  • Added a NotifyChanges method for addons that provide their own class color options UI, but not their own CUSTOM_CLASS_COLORS implementation, and want to propigate their changes to other addons through the CUSTOM_CLASS_COLORS system.
  • Added support for female-specific class names to the GetClassToken method, though I suspect nobody has ever actually used this method.

Version 5.4.2.88
  • Fixed an issue preventing player specialization names from appearing the inspect frame

Version 5.4.1.87
  • Fixed an error on the PTR caused by Blizzard fixing a typo in a function name

Version 5.4.1.86
  • Updated for WoW 5.4
  • Fixed coloring in the LFG cooldown list

Version 5.3.0.83
  • Updated for WoW 5.3
  • Fixed coloring in Challenge Mode best times tooltips

Version 5.2.0.80
  • Updated for WoW 5.2

Version 5.1.0.78
  • Updated for WoW 5.1

Version 5.0.4.76
  • Updated for WoW 5.0.4
  • Added better compatibility with other implementations of CUSTOM_CLASS_COLORS

Version 4.3.4.56
  • Raid and party member blips on the world map will now be recolored using your custom colors.
  • Due to Blizzard restrictions, it is not possible to recolor blips on the minimap.
  • Added Português (ptBR) localization.

Version 4.2.0.51
  • Updated for WoW 4.2

Version 4.1.0.49
  • Updated for WoW 4.1
  • Removed the IterateClasses metamethod since nobody uses it
  • Changed the GetColoredName override to more closely emulate the original Blizzard function, as requested by Funkydude on WowAce

Version 4.0.3.43
  • Fixed LFR browser and who list coloring

Version 4.0.3.40
  • Fixed raid panel coloring

Version 4.0.1.36
  • Someday I will remember to turn off debugging before posting a release...

Version 4.0.1.35
  • Updated Blizzard UI coloring for WoW 4.0

Version 4.0.1.33
  • Removed a function that no longer exists in WoW 4.0
  • Guild panel coloring hasn't been updated yet

Version 3.3.3.29
  • Player names in the raid panel will now always be colored correctly
  • Added additional checks to prevent GetPlayerInfoByGUID usage errors

Version 3.3.0.26
  • Added coloring of class names in the channel pane of the chat config window

Version 3.3.0.24
  • Added coloring of names in the LookingForRaid interface
  • Fixed drycode errors

Version 3.3.0.22
  • Updated for WoW 3.3
  • Removed coloring for parts of the UI that aren't normally colored. This functionality may or may not reappear in a separate addon at a later date.
Archived Files (9)
File Name
Version
Size
Author
Date
5.4.2.90
12kB
Phanx
12-21-13 10:40 PM
5.4.2.89
12kB
Phanx
12-21-13 10:09 PM
5.4.2.88
12kB
Phanx
12-12-13 03:44 AM
5.4.1.87
12kB
Phanx
12-08-13 04:48 AM
5.4.1.86
12kB
Phanx
11-30-13 11:23 AM
5.3.0.83
12kB
Phanx
07-08-13 08:01 PM
5.2.0.80
12kB
Phanx
03-05-13 05:36 AM
5.1.0.78
11kB
Phanx
12-05-12 05:10 AM
5.0.4.76
11kB
Phanx
08-29-12 02:12 AM


Post A Reply Comment Options
Old 10-21-12, 08:45 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
@Stanzilla:

Please don't post 500 lines of local variables and other junk in a comment. I deleted it, because it's not relevant (only the actual error message is relevant in 9999999999999/10000000000000 cases) and I don't want to have to scroll through it.

Anyway, that error can only occur if one of your other addons is doing something wrong, and calling ChatFrameN:AddMessage without actually providing a message. I know AtlasLoot used to cause that error years ago. I don't know what addon might be causing the problem for you (it may even be AtlasLoot) but it is caused by some other addon.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline Report comment to moderator  
Reply With Quote
Old 08-29-12, 02:14 AM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
Version 5.0.4.76
  • Updated for WoW 5.0.4
  • Added better compatibility with other implementations of CUSTOM_CLASS_COLORS

Version 4.3.4.56
  • Raid and party member blips on the world map will now be recolored using your custom colors.
    Due to Blizzard restrictions, it is not possible to recolor blips on the minimap.
  • Added Português (ptBR) localization.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline Report comment to moderator  
Reply With Quote
Old 12-17-11, 07:07 AM  
devilArt
A Fallenroot Satyr
 
devilArt's Avatar

Forum posts: 26
File comments: 97
Uploads: 0
raid/party member on the minimap and world map are still default color
devilArt is offline Report comment to moderator  
Reply With Quote
Old 07-09-11, 10:37 AM  
Dainton
A Flamescale Wyrmkin
 
Dainton's Avatar
AddOn Author - Click to view AddOns

Forum posts: 115
File comments: 65
Uploads: 1
I posted a bug about the PaperDollFrame level being broken. Not sure if it tells you when you have new bugs on here or not. There's also a fix for it with it to make your life easier.
Dainton is offline Report comment to moderator  
Reply With Quote
Old 07-01-11, 07:12 AM  
Akkorian
A Flamescale Wyrmkin
 
Akkorian's Avatar
AddOn Author - Click to view AddOns

Forum posts: 107
File comments: 122
Uploads: 2
Version 4.2.0.51
  • Updated for WoW 4.2
__________________
“Be humble, for you are made of earth. Be noble, for you are made of stars.” — Serbian proverb
Akkorian is offline Report comment to moderator  
Reply With Quote
Old 06-29-11, 02:28 PM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1176
File comments: 783
Uploads: 82
4.2

Code:
local PLAYER_LEVEL = (PLAYER_LEVEL:gsub( "\124c%%s", "|cff%%02x%%02x%%02x"))
local PLAYER_LEVEL_NO_SPEC = (PLAYER_LEVEL_NO_SPEC:gsub( "\124c%%s", "|cff%%02x%%02x%%02x" ))
near the top of ClassColorsBlizz.lua should fix it for 4.2 (string.replace was removed)
Dridzt is offline Report comment to moderator  
Reply With Quote
Old 11-25-10, 11:36 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
Version 4.0.3.40
  • Fixed raid panel coloring
Last edited by Phanx : 11-25-10 at 11:37 PM.
Phanx is offline Report comment to moderator  
Reply With Quote
Old 11-20-10, 01:38 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
I'm not raiding currently, but I'll see if I can get some people together to check that out.
Phanx is offline Report comment to moderator  
Reply With Quote
Old 11-19-10, 10:56 PM  
Grungra
A Murloc Raider

Forum posts: 8
File comments: 20
Uploads: 0
Class colors in blizzard's raid window

Since the last patch, the raid window was getting the colors wrong, if I moved people around from group to group they would take the same color as my character... if I played on mage they would all turn light blue, as hunter they would go all green. Did they change something on their code that would make that happen? No errors at all, just the coloring of all raiders regardless of class would end up being the same color as the character I had in raid at the time. It looks funny to have a raid full of the same class.

Disabled ClassColors and the problem went away.
Grungra is offline Report comment to moderator  
Reply With Quote
Old 11-07-10, 12:11 AM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
Fixed. Someday I will remember to turn off debugging before posting a release...
Phanx is offline Report comment to moderator  
Reply With Quote
Old 11-06-10, 10:53 PM  
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 9479
File comments: 578
Uploads: 24
debug print() statements were accidentally left in

For users: to get rid of the messages spamming your chat frame, open up ClassColorsBlizz.lua in any text editor, find each instance of the word print and place two dashes -- in front of it. There are about 13 of them.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

[SIGPIC][/SIGPIC]
Seerah is offline Report comment to moderator  
Reply With Quote
Old 11-05-10, 03:57 AM  
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1151
File comments: 1107
Uploads: 29
That's fair enough. However, the character frame does have a class colored text in the default UI since 4.0.1. Ignore the missing textures in the screenshot.



Code:
function PaperDollFrame_SetLevel()
	local primaryTalentTree = GetPrimaryTalentTree();
	local classDisplayName, class = UnitClass("player"); 
	local classColor = CUSTOM_CLASS_COLORS[class];
	local classColorString = format("ff%.2x%.2x%.2x", classColor.r * 255, classColor.g * 255, classColor.b * 255);
	local specName;
	
	if (primaryTalentTree) then
		_, specName = GetTalentTabInfo(primaryTalentTree);
	end
	
	if (specName and specName ~= "") then
		CharacterLevelText:SetFormattedText(PLAYER_LEVEL, UnitLevel("player"), classColorString, specName, classDisplayName);
	else
		CharacterLevelText:SetFormattedText(PLAYER_LEVEL_NO_SPEC, UnitLevel("player"), classColorString, classDisplayName);
	end
end
As for the nameplates, it's strange that you've never seen them class colored. They should be for enemy players.
Last edited by Haleth : 11-05-10 at 04:11 AM.
Haleth is offline Report comment to moderator  
Reply With Quote
Old 11-02-10, 09:35 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
Addons have no access to the class-colored player blips, and can only "modify" some other types of blips through a special API that only allows setting the texture, not setting the vertex color, so even if it were possible to replace the class blips, you would have to edit the texture file yourself in Photoshop or a similar program.

The default UI does not color the player name in the character frame, so I won't do anything with that.

Nameplates are only class-colored if you enable the option, and then only in enemy player nameplates, and then only under some circumstances I've never encountered. I have that option enabled, but have never seen class colors in anyone's nameplate, enemy player or otherwise. For that reason, I haven't been inclined to jump into the convoluted and inefficient mess that is the world of nameplate modification.
Phanx is offline Report comment to moderator  
Reply With Quote
Old 11-01-10, 10:34 AM  
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 1151
File comments: 1107
Uploads: 29
Is there any chance to extend the functionality to map blips, nameplates, and the character frame player name?
Haleth is offline Report comment to moderator  
Reply With Quote
Old 10-16-10, 03:15 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3709
File comments: 1863
Uploads: 38
Version 4.0.1.33
  • Removed a function that no longer exists in WoW 4.0
  • Guild panel coloring hasn't been updated yet

I'll try to get an update for the guild panel out soon.
Phanx is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: