Using Colour Codes

K

Kevin

Guest
Actually I just decided to correct your spelling for you :D

Pineapple said:
--------------------------------------------------------------------------
What are Colour Codes? What are They for?

Colour codes are just a code placed in a tool tip or description in the Warcraft WE. Colour codes allow you to colour your text.
With it you can make many different colours. It is great when you want to highlight a specific thing.

Now. Before Ii get any farther you must know one thing. The colour code is shown like this: |cTTRRGGBB"Ooo! Nice Text!"|r
--------------------------------------------------------------------------
What Does it meen?

|c - This is extremely important! It tells Warcraft that it needs to use the colour code after it. Without it your text would look like this: "005599FFOoo! Nice Text|r"

TT - This is less important. This is the transparency of the text. Type FF or 00 or what you want. They game doesn't use it, but it checks to see if its there, if not, then the colour code wont work.

RR - This is how much red is in the colour you are mixing up.

GG - This is how much green is in the colour you are mixing up.

BB - This is how much blue is in the colour you are mixing up.

|r - This is important too. It tells Warcraft that the colour code is done and to stop colouring text, it is not needed if you want all after the code to be coloured.
--------------------------------------------------------------------------
The Code

So, now you know what is colour code is and the basic layout. But, you don’t know what you replace "TTRRGGBB" with. I will explain that here.

The colour code is split into 4 sections, transparency, red, green, and blue. You know that but you replace them with numbers and a few letters in increase the amount of that colour. Like when you change blue and green on a unit in the object editor to 0, it will be red,

This makes no sense :s

“likewise will the text is you teft that same colours blank. They get replaced with 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A(10), B(11), C(12), D(13), E(14), F(15). Each section places two of the numbers together to form a number form 0-255. Same as object editor. Ill put a list up to show you what they equal.”

Colour Code........0-255

00.....................0
11.....................17
22.....................34
33.....................51
44.....................68
55.....................85
66.....................102
77.....................119
88.....................136
99.....................153
AA.....................170
BB......................187
CC.....................204
DD.....................221
EE.....................238
FF.....................255

Full list Written by Chocobo:
Code:
0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15

  0. 00[list=1]
[*]01
[*]02
[*]03
[*]04
[*]05
[*]06
[*]07
[*]08
[*]09
[*]0A
[*]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*]C5
[*]C6
[*]C7
[*]C8
[*]C9
[*]CA
[*]CB
[*]CC
[*]CD
[*]CE
[*]CF
[*]D0
[*]D1
[*]D2
[*]D3
[*]D4
[*]D5
[*]D6
[*]D7
[*]D8
[*]D9
[*]DA
[*]DB
[*]DC
[*]DD
[*]DE
[*]DF
[*]E0
[*]E1
[*]E2
[*]E3
[*]E4
[*]E5
[*]E6
[*]E7
[*]E8
[*]E9
[*]EA
[*]EB
[*]EC
[*]ED
[*]EE
[*]EF
[*]F0
[*]F1
[*]F2
[*]F3
[*]F4
[*]F5
[*]F6
[*]F7
[*]F8
[*]F9
[*]FA
[*]FB
[*]FC
[*]FD
[*]FE
[*]FF
[/list]
--------------------------------------------------------------------------
Some Helpful Colours

That should help you with creating those nice tooltips. But here are some that you would probably use most.

Red FFFF0000
Lime FF00FF00
Blue FF0000FF
Orange FFFFA500
Green FF008000
Purple FF800080
Pink FFC0CB
Gold FFFFD700
Aqua/Cyan FF00FFFF
Sky Blue FF87CEFA
Silver FFC0C0C0
Black FF000000
White FFFFFFFF

Player Colours:
Code:
Red: |CFFFF0303 |R (255,3,3)
Blue: |CFF0042FF |R (0,66,255)
Teal: |CFF1CB619 |R (28,230,185)
Purple: |CFF540081 |R (80,0,129)
Yellow: |CFFFFFF01 |R (255,255,1)
Orange: |CFFFE8A0E |R (254,138,14)
Green: |CFF20C000 |R (32,192,0)
Pink: |CFFE55BB0 |R (229,91,176) 
Grey: |CFF959697 |R (149,150,151)
Light Blue: |CFF7EBFF1 |R (126,191,241)
Dark Green: |CFF106246 |R (16,98,70)
Brown: |CFF4E2A04 |R (74,42,4)

Here is a great place to get a colour.
--------------------------------------------------------------------------
Here are 2 good colour generators:
http://www.free-webmaster-tools.com/colorpicker.htm
http://www.developingwebs.net/tools/color.php

You could also use photoshop or another program like it.
 

Knights

You can change this now in User CP.
Reaction score
71
Some Helpfull Colours - Some Helpful Colours/Some Helpful Colors.


Just a common spelling mistake...:)
 
K

Kevin

Guest
Knights said:
Some Helpfull Colours - Some Helpful Colours/Some Helpful Colors.


Just a common spelling mistake...:)

man now I am red I didn't catch that when I tried to correct it in word perfect.

:eek:
 

Knights

You can change this now in User CP.
Reaction score
71
Umm...chocobo already explained that to us....? Or was I dreaming....?


:eek: :eek: :eek:
 

Tonks

New Member
Reaction score
160
Here's a useful little trigger that Deathacus gave me. It sets the colors for each player, to match their player color.
Code:
function Trig_colors_Actions takes nothing returns nothing
    call SetPlayerColorBJ( Player(0), PLAYER_COLOR_RED, true )
    call SetPlayerColorBJ( Player(1), PLAYER_COLOR_BLUE, true )
    call SetPlayerColorBJ( Player(2), PLAYER_COLOR_CYAN, true )
    call SetPlayerColorBJ( Player(3), PLAYER_COLOR_PURPLE, true )
    call SetPlayerColorBJ( Player(4), PLAYER_COLOR_YELLOW, true )
    call SetPlayerColorBJ( Player(5), PLAYER_COLOR_ORANGE, true )
    call SetPlayerColorBJ( Player(6), PLAYER_COLOR_GREEN, true )
    call SetPlayerColorBJ( Player(7), PLAYER_COLOR_PINK, true )
    call SetPlayerColorBJ( Player(8), PLAYER_COLOR_LIGHT_GRAY, true )
    call SetPlayerColorBJ( Player(9), PLAYER_COLOR_LIGHT_BLUE, true )
    call SetPlayerColorBJ( Player(10), PLAYER_COLOR_AQUA, true )
    call SetPlayerColorBJ( Player(11), PLAYER_COLOR_BROWN, true )

    set udg_Colors[1] = "|c00ff0000" //red   RGB
    set udg_Colors[2] = "|c000000ff" //blue
    set udg_Colors[3] = "|c0000ffff" //teal
    set udg_Colors[4] = "|c00ff00ff" //purple
    set udg_Colors[5] = "|c00ffff00" //yellow
    set udg_Colors[6] = "|c00ff7f00" //orange
    set udg_Colors[7] = "|c0000ff00" //Green
    set udg_Colors[8] = "|c00ff7f7f" //pink
    set udg_Colors[9] = "|c00afafaf" //gray
    set udg_Colors[10] = "|c007f7fff" //light blue
    set udg_Colors[11] = "|c00007f7f" //dark green
    set udg_Colors[12] = "|c007f3f3f" //brown
endfunction

//===========================================================================
function InitTrig_Set_colors takes nothing returns nothing
    set gg_trg_Set_colors = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Set_colors, function Trig_colors_Actions )
endfunction
Also, to display it correctly, you'll need these trigger parts:
Code:
Actions
    Set Instagator = Player 1 (Red)
    Set PlayerName = (Colors[(Player number of Instagator)] + ((Name of Instagator) + |r))
    Game - Display to (All players) the text: (PlayerName +  |c00afafafhas left the game! That fatty !|r)
You need to change the Set Instagator = Player to each of the players, depending on who's leaving. OR if it's a Triggering Player trigger, you can just set that to Triggering Player.

I thought this might be useful in your tutorial, since that's mostly what people want to use Colors for in their mapping, is coloring names. (Also, the Player Colors aren't exactly what they are in the game, but they're very close.)
 

Pineapple

Just Smile.
Reaction score
576
Knights said:
Some Helpfull Colours - Some Helpful Colours/Some Helpful Colors.


Just a common spelling mistake...:)

No thats spelt right im CANADIAN

Tonks said:
Here's a useful little trigger that Deathacus gave me. It sets the colors for each player, to match their player color.
Code:
function Trig_colors_Actions takes nothing returns nothing
    call SetPlayerColorBJ( Player(0), PLAYER_COLOR_RED, true )
    call SetPlayerColorBJ( Player(1), PLAYER_COLOR_BLUE, true )
    call SetPlayerColorBJ( Player(2), PLAYER_COLOR_CYAN, true )
    call SetPlayerColorBJ( Player(3), PLAYER_COLOR_PURPLE, true )
    call SetPlayerColorBJ( Player(4), PLAYER_COLOR_YELLOW, true )
    call SetPlayerColorBJ( Player(5), PLAYER_COLOR_ORANGE, true )
    call SetPlayerColorBJ( Player(6), PLAYER_COLOR_GREEN, true )
    call SetPlayerColorBJ( Player(7), PLAYER_COLOR_PINK, true )
    call SetPlayerColorBJ( Player(8), PLAYER_COLOR_LIGHT_GRAY, true )
    call SetPlayerColorBJ( Player(9), PLAYER_COLOR_LIGHT_BLUE, true )
    call SetPlayerColorBJ( Player(10), PLAYER_COLOR_AQUA, true )
    call SetPlayerColorBJ( Player(11), PLAYER_COLOR_BROWN, true )

    set udg_Colors[1] = "|c00ff0000" //red   RGB
    set udg_Colors[2] = "|c000000ff" //blue
    set udg_Colors[3] = "|c0000ffff" //teal
    set udg_Colors[4] = "|c00ff00ff" //purple
    set udg_Colors[5] = "|c00ffff00" //yellow
    set udg_Colors[6] = "|c00ff7f00" //orange
    set udg_Colors[7] = "|c0000ff00" //Green
    set udg_Colors[8] = "|c00ff7f7f" //pink
    set udg_Colors[9] = "|c00afafaf" //gray
    set udg_Colors[10] = "|c007f7fff" //light blue
    set udg_Colors[11] = "|c00007f7f" //dark green
    set udg_Colors[12] = "|c007f3f3f" //brown
endfunction

//===========================================================================
function InitTrig_Set_colors takes nothing returns nothing
    set gg_trg_Set_colors = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Set_colors, function Trig_colors_Actions )
endfunction
Also, to display it correctly, you'll need these trigger parts:
Code:
Actions
    Set Instagator = Player 1 (Red)
    Set PlayerName = (Colors[(Player number of Instagator)] + ((Name of Instagator) + |r))
    Game - Display to (All players) the text: (PlayerName +  |c00afafafhas left the game! That fatty !|r)
You need to change the Set Instagator = Player to each of the players, depending on who's leaving. OR if it's a Triggering Player trigger, you can just set that to Triggering Player.

I thought this might be useful in your tutorial, since that's mostly what people want to use Colors for in their mapping, is coloring names. (Also, the Player Colors aren't exactly what they are in the game, but they're very close.)

Thanks but i dont need i thikn someone has a tutorial called playing with player names/colours or somthing.
 

Knights

You can change this now in User CP.
Reaction score
71
HelpfulL, It's the L. I was saying: Helpfull Colours - Helpful Colours OR Helpful Colors, depending if American or Canadian.
 

Pineapple

Just Smile.
Reaction score
576
Knights said:
HelpfulL, It's the L. I was saying: Helpfull Colours - Helpful Colours OR Helpful Colors, depending if American or Canadian.

Oh, sorry, i got confuzzled. I didn't put the 2 L's.
 
K

Kevin

Guest
Well I just want to stress how helpful this tutorial is to me, I still reference it :)

If you would go back to my post on page 2, use it, I corrected all of the grammar errors I could find. Clean up that one paragraph a little (it had me confused) and edit your original post with the changes. I strongly suggest this be made as a permanent tutorial.


I really really like it :D
 

Knights

You can change this now in User CP.
Reaction score
71
You mean tutorial section I presume. I would think it could make it there too.
 

Pineapple

Just Smile.
Reaction score
576
Ok, i got it all fixed up i hope. And i fixed that one part to make more sense. read over if you get the chance.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Maybe a little off topic.. But did you know a color code like this is a web-save colour?

Warcraft has the 8 letter colour code, The first 2 must say the transparency, Wich ofcourse Wc3 does not support.. So i'll just cut the first 2 off.

It go's in pairs of 2 ( [ff] = pair)

Websave color: [FF][99][cc] - [33][cc][33]
Not websave color: [f3][cf][93] (These arn't pairs of 2)

So as you can see.. Maybe something usefull to post in the web help forum
For new unknown and maybe (hacked) browsers will display the websave colours the same way.
 
N

NewMapper24

Guest
thanks man u helped me a lot if i could i would +rep u but im in this god dam red ditch and i can't seem to find my way out. Thanks again REALLy helped and i think that sample map was a good idea but thats just me :D
 

MrApples

Ultra Cool Member
Reaction score
78
Doesn't really seem like this is worth its own Tutorial, i've incorporated it into 2 of my tutorials now, but never on its own.

Well its better then the one on the tutorial site, however you should include how to get the | key.

Pineapple said:
TT - This is less important. This is the transparency of the text. Type FF or 00 or what you want. They game doesn't use it, but it checks to see if its there, if not, then the colour code wont work.
According to GuyWhoWasNastyAboutRemakeOfFriendlyMapsTutorialWhichIForgetTheNameOfSoIDecidedToMakeThisVariableThingyForHisNameReallyLongCauseItsFunForNoReasonAtAllWooo this isn't true, it doesn't need it.
 

Knights

You can change this now in User CP.
Reaction score
71
It needs it. A code with: |cff0000 will NOT work. |cffff0000 WILL.
 

Pineapple

Just Smile.
Reaction score
576
Ok, ill explain how to get | tomarrow, im sleepy. And, i actually made this because when i was a noob and wanted to know colour codes i look at the tutorial here but was like WTF?! It doesn't really explain it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top