Tutorial Color Code Tutorial

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
If you have ever wondered how they colour the text in-game in many different specters of colours, then you came to the right place to look for.

How can I colour the text, then?


The colour of the text is defined with a few tags and a piece of colour code. I will not go into the technicalities, as this does not matter very much right now (colouring should be easy, right?). Instead, lets get started with an example.

Lets say, you want to display "Hello, my friend!" as golden. To do that, you need to define the beginning of the coloured text with" |c" (Without the quotes).

|c

After that, you need to insert the wanted colour code, which consists of 8 letters or numbers. (The first 2 letters define the transparency, but warcraft does not use that, so, FF or 00 will almost always do. The next 2 letters define the red value, the 2 letters after that define the green value and the last 2 letters define the blue value.)

|cffffcc00

Now, it is time to enter the message you want to colour.

|cffffcc00Hello, my friend!

And finally, you need to end the colouring process, by placing "|r" behind the last letter you want to be coloured.

|cffffcc00Hello, my friend!|r

So, this should leave you with something like this:

|cffffcc00Hello, my friend!|r


It may look weird, but in-game, the "Hello, my friend!" text is only show, in a nice, golden colour.

And basically...thats it. I am not going to mumble-jumble and make it more complicated, but instead, I will just mention the frequently asked and used colours, which you certainly will need some day.

Gold&lumber colours

gold.gif
Gold colour - FFFFCC00
255, 204, 0 for RGB values.
100%, 80%, 20% for % RGB values.

LUMBER.gif
Lumber colour - CF01BF4D
120, 204, 0 for RGB values.
48%, 81,6%, 20% for % RGB values.

Player colours

Player1.gif
Player 1 (Red) - CFFF0202
255, 3, 3 for RGB values.
100%, 1.17%, 1.17% for % RGB values.

Player2.gif
Player 2 (Blue) - CF0041FF
0, 66 ,255 for RGB values.
0%, 25.88%, 100% for % RGB values.

Player3.gif
Player 3 (Teal) - CF1BE5B8
28, 230, 185 for RGB values.
10.98%, 90.20%, 72.55% for % RGB values.

Player4.gif
Player 4 (Purple) - CF530080
80, 0, 129 for RGB values.
31.37%, 0%, 50.59% for % RGB values.

Player5.gif
Player 5 (Yellow) - CFFFFC00
255, 255, 1 for RGB values.
100%, 100%, 0.39% for % RGB values.

Player6.gif
Player 6 (Orange) - CFFE890D
254, 138, 14 for RGB values.
99.6%, 54.12%, 5.49% for % RGB values.

Player7.gif
Player 7 (Green) - CF1FBF00
32, 192, 0 for RGB values.
12.55%, 75.30%, 0% for % RGB values.

Player8.gif
Player 8 (Pink) - CFE45AAF
229, 91, 176 for RGB values.
89.80%, 35.69%, 69.02% for % RGB values.

Player9.gif
Player 9 (Gray) - CF949596
149, 150, 151 for RGB values.
58.43%, 58.82%, 59.22% for % RGB values.

Player10.gif
Player 10 (Light blue) - CF7DBEF1
126, 191, 241 for RGB values.
49.41%, 74.9%, 94.51% for % RGB values.

Player11.gif
Player 11 (Dark green) - CF0F6145
16, 98, 70 for RGB values.
6.27%, 38.43%, 27.45% for % RGB values.

Player12.gif
Player 12 (Brown) - CF4D2903
74, 42, 4 for RGB values.
29.02%, 16,47%, 1.57% for % RGB values.

Player13-14-15-16.gif
Player 13-16 (Neutral ...) - CF272727
45, 45, 45 for RGB values.
17.65%, 17.65%, 17.65% for % RGB values.

And finally, a easy trigger system, which uses string arrays to hold the colour code values and displays the name of the leaving player, when someone leaves.

Initialize the colour codes.

Initializations.gif

Show the name of the left player in the same colour has he/she was in-game.

piltaass.gif

A few helping sites/link/programs:

Hexadeciaml Number System - How to convert numbers into hexadecimal and vice versa.

Chaos Spectrum - Colour code generator for Warcraft III.

Hexadecimal Colour Chart - Remember, Warcraft uses transparent values too, so, if you pick a colour from there, just add FF or 00 in front of the colour code, so it would be 8 letterts/numbers long.
 

elmstfreddie

The Finglonger
Reaction score
203
On the last trigger, it says Display to (All Players) The text: blah blah blah, but before that you set a tmpforce which is set to (all players), then you remove it. I didn't think that (all players) leaked anyways, so why did you set the force if you weren't going to use it?

(black is 0, 0, 0 :p, or |c00000000|r)

Also, maybe you could explain how to convert numbers into hexadecimal? It's very simple :)
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Black colour is basically Neutral Players' colour. Or if you want a really, really black colour, use cf000000. (0, 0 ,0 for RGB)
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
hmm destroying All Players Group is irreversible i think u should delete it off it so people won't get mixed up....

anyway good job on the tutorial +Rep :p (ASAP)
 

elmstfreddie

The Finglonger
Reaction score
203
Maybe iron, but no irony...
And why not? I could explain it right here and right now!
Hexadecimal works using 1-F, meaning 1,2,3,4,5,6,7,8,9,a,b,c,d,e,f. The letters represent numbers if they were numbers (for example a = 10, b = 11, f = 15). In hexadecimal, the first number multiplied by 16, and then you add the second number. Warcraft only goes up to 2 hexadecimal digits, and most programs do (255, because FF is (15*16)+15=255) too.
 

Master

Thou shall be helped by...The Black Adder!
Reaction score
72
anyway good job on the tutorial +Rep :p (ASAP)
No matter what tutorial you make, Doom-Angel will swiftly come up with a comment and-or excuse to rep you :p



In my view, it is very detailed, it includes pictures and proper triggerwork, and is a frequent matter. Good job.

*Points at the Tutorial Index*
 
Reaction score
65
Deja vu, where have I seen this before? It must be one of the existing tutorials... No, nothing there. Hmm... Oh, it was one of MrApples' tutorials! Are you planning on replacing the other useful tutorials, too?
 

elmstfreddie

The Finglonger
Reaction score
203
Is there 1 type of cola out there? Is there 1 type of bottled water? Nothing wrong with redoing something your own way.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
No matter what tutorial you make, Doom-Angel will swiftly come up with a comment and-or excuse to rep you
well i think he deserves it :D
besides i don't Rep on any tutorial just for those which i think are useful (not only for me)

besides i think it's my choice how to share my Rep.....
 
Reaction score
65
Now someone got the wrong idea of what I was saying...
Ofcourse people are making new tutorials to replace MrApples' tutorials. Othervise... well, there would be no tutorials for those things here.
 

Lanboy

TH.net Regular
Reaction score
22
Nice, but what's the point of using the "TmpInteger" integer variable?


EDIT: +REP :p
 
I

IKilledKEnny

Guest
Well done tutorial, however I would have also added the fact that those are light colors and not regular colors.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Maybe iron, but no irony...
And why not? I could explain it right here and right now!
Hexadecimal works using 1-F, meaning 1,2,3,4,5,6,7,8,9,a,b,c,d,e,f. The letters represent numbers if they were numbers (for example a = 10, b = 11, f = 15). In hexadecimal, the first number multiplied by 16, and then you add the second number. Warcraft only goes up to 2 hexadecimal digits, and most programs do (255, because FF is (15*16)+15=255) too.

To put it in a simple way.:p An average mapper does not need this, tho. There are colour charts.

Deja vu, where have I seen this before? It must be one of the existing tutorials... No, nothing there. Hmm... Oh, it was one of MrApples' tutorials! Are you planning on replacing the other useful tutorials, too?

Actually, I did not redo any of someones tutorials. Can you link me his tutorial?

Nice, but what's the point of using the "TmpInteger" integer variable?

I did not want an image with big width; smaller image - in size and in measurements. Purely, thinking of aesthetics. :)


EDIT:

I would reward someone, who could give me the % RGB values needed for the player colours. :)
 

LoveTD's

New Member
Reaction score
34
EDIT:

I would reward someone, who could give me the % RGB values needed for the player colours. :)

0,392156862 = 1 rgb in % so if you want

255, 2, 2 (or something like that)

then do 0,392156862*255
and 0,392156862*2

so that would be:

100%, 0.78%, 0.78%

(if you want me to have all percentages it's gonna take a while :))

I'm over the half way of giving you the percentage :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top