HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

player colors question

02-09-2006, 10:11 PM#1
Linera
How can I get the values for each player in order to set it on a multiboard?
02-09-2006, 10:54 PM#2
Immoralis
Use a color program and just match it, chaos spectrum has all the basic player colors in one place.
02-10-2006, 12:24 AM#3
qwertyui
You, of course, know how the |c|r colouring system works?
02-10-2006, 01:40 AM#4
Linera
no i don't
02-10-2006, 01:55 AM#5
Murder1833
I dont wanna explain, there is a tut or 2 lying around in the tut forum bout it.
02-10-2006, 06:22 AM#6
qwertyui
okaaaay....
I may be a bit wrong here about how exactly the colorcodes are written, but the general idea is like this:

So basically to color some text in some color, you write the following:
|c$$$$$$$$Your text|r

Where $$$$$$$$ are 8 symbols out of 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f, representing a hexadecimal RGB code for the color u need.

For instance |cffff0000sometext|r will color the text "sometext" red, while |cff00ff00somemoretext|r will make "somemoretext" green.

Better examples on how its used can be found in various object editor tooltips - you just need to look for a bit.
02-10-2006, 10:01 AM#7
PhoenixFeather
I have a list of all the colour-codes at home. I'll post it as soon as get there.
02-10-2006, 10:24 AM#8
Jacek
I think he meant colours like "teal" "red"... :D
02-10-2006, 10:33 AM#9
Nantuko Husk
I have some function in my map , which initializes a string array that holds the color codes of the players.

Collapse JASS:
function InitPlayerColors takes nothing returns nothing
    set udg_ColorStringOfPlayer [ 1 ] = "|c00FF0000" // red
    set udg_ColorStringOfPlayer [ 2 ] = "|c000000FF" // blue
    set udg_ColorStringOfPlayer [ 3 ] = "|c0000FFFF" // teal
    set udg_ColorStringOfPlayer [ 4 ] = "|c008000FF" // purple
    set udg_ColorStringOfPlayer [ 5 ] = "|c00FFFF00" // yellow
    set udg_ColorStringOfPlayer [ 6 ] = "|c00FF8000" // orange
    set udg_ColorStringOfPlayer [ 7 ] = "|c0000D500" // green
    set udg_ColorStringOfPlayer [ 8 ] = "|c00F97EF9" // pink
    set udg_ColorStringOfPlayer [ 9 ] = "|c00AEB4B4" // gray
    set udg_ColorStringOfPlayer [ 10] = "|c00000000" // light blue
    set udg_ColorStringOfPlayer [ 11] = "|c00006200" // dark green
    set udg_ColorStringOfPlayer [ 12] = "|c009C8000" // brown
endfunction

These are the colors
02-10-2006, 10:36 AM#10
Jacek
And if you add Nantuko's function you can make

Display text message to All Players - ColorStringOfPlayer[3] + "is noob"

it will show Teal is noob
02-10-2006, 10:54 AM#11
Anitarf
Actually, it will just show "is noob" in teal colour.

And those colours aren't exact, here are the correct colours:

XXX/255 Values:
red: 255-3-3
blue: 0-66-255
teal: 28-230-185
purple: 84-0-129
yellow: 255-252-1
orange: 254-186-14
green: 32-192-0
pink: 229-91-176
grey: 149-150-151
light blue: 126-191-241
dark green: 16-98-70
brown: 78-42-4

RGB % Values:
red: 100.00, 1.17, 1.17
blue: 0.00, 25.88, 100.00
teal: 9.80, 90.20, 72.55
purple: 32.94, 0.00, 50.59
yellow: 100.00, 98.82, 0.40
orange: 99.61, 72.94, 5.49
green: 12.55, 75.30, 0.00
pink: 89.80, 35.69, 69.02
grey: 58.43, 58.82, 59.21
light blue: 49.41, 74.90, 94.51
dark green: 6.27, 38.43, 27.45
brown: 30.59, 16.47, 1.57

Set color[1] = |c00ff0303
Set color[2] = |c000042ff
Set color[3] = |c001ce6b9
Set color[4] = |c00540081
Set color[5] = |c00fffc01
Set color[6] = |c00ff8000
Set color[7] = |c0020c000
Set color[8] = |c00e55bb0
Set color[9] = |c00959697
Set color[10] = |c007ebff1
Set color[11] = |c00106246
Set color[12] = |c004e2a04

This last set are the ones you want to use. Simply put the colour string in front of any text you want coloured, and at the end of that text, put "|r" to go back to normal colour.
02-10-2006, 10:58 AM#12
qwertyui
By the way, if its not already a part of triggers FAQ, i feel it should be :)
02-10-2006, 11:33 AM#13
Vexorian
Color text seems more for general though.

*Somebody * has to update the FAQ btw
02-10-2006, 11:33 AM#14
Nantuko Husk
Antiarf , you are wrong there , most of the colors I posted are the exact ones.

Only Pink , Gray and Brown differ some , but not that much.

and why would red be 255-3-3 it is clearly obvious that red is 255-0-0

and I dont have the will to check the rest of the colors.
02-10-2006, 12:13 PM#15
Anitarf
Why should it be clearly obvious? 255-3-3 is only slightly less reddish than 255-0-0, how can you say for certain which one of these two is the actual red player colour?

Anyway, I didn't make these up, I compiled the list from multiple other posts, they could have been wrong... but they were not disputed at the time.