• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[General] [Color Codes] A Bug?

Status
Not open for further replies.
Level 3
Joined
May 15, 2011
Messages
30
I haven't seen this happen before in any one of the maps I've edited (though to be fair I haven't created all to many maps), but it seems every single colour does not display as was intended.

I created a test item named "Colour Checker", and had the following tooltip set for the item to check which colours displayed for which colour codes.

Code:
|cFF000000Red|r |n
|c00FF0000Green|r |n
|c0000FF00Blue|r |n
|cFFA50000Orange|r |n
|c80008000Purple|r |n
|cFFFF0000Yellow|r |n
|c80808000Gray|r |n
|c00000000Black|r |n
|cFFFFFF00White|r |n

The colour codes used are from this website with the corresponding name:
http://www.computerhope.com/htmcolor.htm

I've cross checked with other websites to make sure that the error was not as part of the website, but indeed if you have a code written FF0000 you'd expect it to be red regardless.

What appears in game is thus:
4qrxdm.jpg


It seems at first that the blue component has been completely erased which is what I thought at first was messing up all my colours. But apparently not, because by screwing around with random codes I was able to recreate it.

|cE60E27FFBlue Apparently|r

So from what I can tell Blue has become Green which has become Red which has become Black. And apparently a purpley-reddy sort of colour has become Blue.

I'm stumped. Ideas?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
use these. these are the ones used in wc3 to my knowledge.
a true red is actually
JASS:
"|c00ff0000 this would be true red in wc3 |r"

JASS:
private function colorSetting takes nothing returns nothing
    //-------- Player colors. --------                |    RGB base values
    set playerColors[0] = "|c00ff0303" //red p1       |  255,0,0
    set playerColors[1] = "|c000042ff" //blue p2      |  0,0,255
    set playerColors[2] = "|c001ce6b9" //teal p3      |  0,128,128
    set playerColors[3] = "|c00540081" //purple p4    |  128,0,128
    set playerColors[4] = "|c00fffc01" //yellow       |  255,255,0
    set playerColors[5] = "|c00feba0e" //orange       |  255,165,0
    set playerColors[6] = "|c0020c000" //green pc     |  0,255,0
    set playerColors[7] = "|c00e55bb0" //pink         |
    //set playerColors[] = "|cffC0C0C0" //Gray
    //set playerColors[] = "|cffB0E2FF" //Light Blue
    //set playerColors[] = "|cff006400" //Dark Green
    //set playerColors[] = "|cff8B4513" //Brown
    //-------- Gold color --------
    set playerColors[8] = "|cffffcc00" //gold    
endfunction
 
Level 3
Joined
May 15, 2011
Messages
30
So transparency must be the first two digits then? Well that's embarrassing! And I put so much effort into my screenshots :p

Ah well, you live you learn. Thanks! :)
 
Status
Not open for further replies.
Top