• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Red/Green/Blue values for Player Colors?

Status
Not open for further replies.
Hey there.

I am trying to make an SFX based on the arrow model that appears when you right click on the ground (Confirmation.mdx)

I'm using it as an indicator that a certain unit has entered a certain structure. I want it to match the player's color by using
  • Special Effect - Set Color of (Last created special effect) to color of Player 1 (Red)
This trigger uses the Red/Green/Blue values to colorize the SFX. However, I don't actually know all the different combinations of values to get the perfect matching color for each Player Color, 24 in total.
Does anyone know them? Help is much appreciated.
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,010
I'm using it as an indicator that a certain unit has entered a certain structure. I want it to match the player's color by using
  • Special Effect - Set Color of (Last created special effect) to color of Player 1 (Red)
This trigger uses the Red/Green/Blue values to colorize the SFX.
No, it doesn't.
This one does
  • Special Effect - Set Color of (Last created special effect) to r: 255, g: 255, b: 255
However, I'm still confused about what you want exactly, or what is needed. Anyway, these are the player colours:
Set VariableSet PlayerColour[1] = |c00ff0303
Set VariableSet PlayerColour[2] = |c000042ff
Set VariableSet PlayerColour[3] = |c001ce6b9
Set VariableSet PlayerColour[4] = |c00540081
Set VariableSet PlayerColour[5] = |c00fffc00
Set VariableSet PlayerColour[6] = |c00fe8a0e
Set VariableSet PlayerColour[7] = |c0020c000
Set VariableSet PlayerColour[8] = |c00e55bb0
Set VariableSet PlayerColour[9] = |c00959697
Set VariableSet PlayerColour[10] = |c007ebff1
Set VariableSet PlayerColour[11] = |c00106246
Set VariableSet PlayerColour[12] = |c004e2a04
Set VariableSet PlayerColour[12] = |c004e2a04
Set VariableSet PlayerColour[13] = |c009b0000
Set VariableSet PlayerColour[14] = |c000000c3
Set VariableSet PlayerColour[15] = |c0000eaff
Set VariableSet PlayerColour[16] = |c00be00fe
Set VariableSet PlayerColour[17] = |c00ebcd87
Set VariableSet PlayerColour[18] = |c00f8a48b
Set VariableSet PlayerColour[19] = |c00bfff80
Set VariableSet PlayerColour[20] = |c00dcb9eb
Set VariableSet PlayerColour[21] = |c00282828
Set VariableSet PlayerColour[22] = |c00ebf0ff
Set VariableSet PlayerColour[23] = |c0000781e
Set VariableSet PlayerColour[24] = |c00a46f33
 
Level 12
Joined
Jan 30, 2020
Messages
875
It's pretty clear, he wants to color some special effects to the color of the related player.

Don't use the hex values, use this :
JASS:
    // Colors by player number
    set Red[1]=255
    set Green[1]=0
    set Blue[1]=0
    set Red[2]=0
    set Green[2]=0
    set Blue[2]=255
    set Red[3]=0
    set Green[3]=255
    set Blue[3]=255
    set Red[4]=100
    set Green[4]=0
    set Blue[4]=150
    set Red[5]=255
    set Green[5]=255
    set Blue[5]=0
    set Red[6]=255
    set Green[6]=175
    set Blue[6]=75
    set Red[7]=0
    set Green[7]=255
    set Blue[7]=0
    set Red[8]=255
    set Green[8]=0
    set Blue[8]=255
.......
And complete with the info found on the link

You can use GUI to setup the colors arrays, you need 3 integer arrays , for example the given Red, Green and Blue and then assign the values according to the info on the link.

In your trigger with the special effect, store the player number into an integer, let's call it index
Then use the action mentioned by @Wrda replacing the 255's by Red[index] then Green[index] and Blue[index].

This said, note that this is called vertex coloring, and that vertex coloring does not often work. It works perfectly on a model with a white texture, but the further away you get from white, the least it will be possible to get the proper color.

If that happens with the model you mentioned, try to open the model in Magos Model Editor or Retera Model Studio and look for the texture it uses, and then try to change that texture in a photo editing program like Photoshop or The Gimp to make it white or more white if you don't want the colors to be too strongly "typed".

Thats what I do in my map with the teleport sfx model, as I use it for towers upgrades with the player color rather than the usual blue.
 

Thanks! Just what I'm looking for.

No, it doesn't.
This one does
  • Special Effect - Set Color of (Last created special effect) to r: 255, g: 255, b: 255
However, I'm still confused about what you want exactly, or what is needed. Anyway, these are the player colours:
Set VariableSet PlayerColour[1] = |c00ff0303
Set VariableSet PlayerColour[2] = |c000042ff
Set VariableSet PlayerColour[3] = |c001ce6b9
Set VariableSet PlayerColour[4] = |c00540081
Set VariableSet PlayerColour[5] = |c00fffc00
Set VariableSet PlayerColour[6] = |c00fe8a0e
Set VariableSet PlayerColour[7] = |c0020c000
Set VariableSet PlayerColour[8] = |c00e55bb0
Set VariableSet PlayerColour[9] = |c00959697
Set VariableSet PlayerColour[10] = |c007ebff1
Set VariableSet PlayerColour[11] = |c00106246
Set VariableSet PlayerColour[12] = |c004e2a04
Set VariableSet PlayerColour[12] = |c004e2a04
Set VariableSet PlayerColour[13] = |c009b0000
Set VariableSet PlayerColour[14] = |c000000c3
Set VariableSet PlayerColour[15] = |c0000eaff
Set VariableSet PlayerColour[16] = |c00be00fe
Set VariableSet PlayerColour[17] = |c00ebcd87
Set VariableSet PlayerColour[18] = |c00f8a48b
Set VariableSet PlayerColour[19] = |c00bfff80
Set VariableSet PlayerColour[20] = |c00dcb9eb
Set VariableSet PlayerColour[21] = |c00282828
Set VariableSet PlayerColour[22] = |c00ebf0ff
Set VariableSet PlayerColour[23] = |c0000781e
Set VariableSet PlayerColour[24] = |c00a46f33

My bad. Yes, I meant this trigger:
  • Special Effect - Set Color of (Last created special effect) to r: 255, g: 255, b: 255
It's pretty clear, he wants to color some special effects to the color of the related player.

Don't use the hex values, use this :
JASS:
    // Colors by player number
    set Red[1]=255
    set Green[1]=0
    set Blue[1]=0
    set Red[2]=0
    set Green[2]=0
    set Blue[2]=255
    set Red[3]=0
    set Green[3]=255
    set Blue[3]=255
    set Red[4]=100
    set Green[4]=0
    set Blue[4]=150
    set Red[5]=255
    set Green[5]=255
    set Blue[5]=0
    set Red[6]=255
    set Green[6]=175
    set Blue[6]=75
    set Red[7]=0
    set Green[7]=255
    set Blue[7]=0
    set Red[8]=255
    set Green[8]=0
    set Blue[8]=255
.......
And complete with the info found on the link

You can use GUI to setup the colors arrays, you need 3 integer arrays , for example the given Red, Green and Blue and then assign the values according to the info on the link.

In your trigger with the special effect, store the player number into an integer, let's call it index
Then use the action mentioned by @Wrda replacing the 255's by Red[index] then Green[index] and Blue[index].

This said, note that this is called vertex coloring, and that vertex coloring does not often work. It works perfectly on a model with a white texture, but the further away you get from white, the least it will be possible to get the proper color.

If that happens with the model you mentioned, try to open the model in Magos Model Editor or Retera Model Studio and look for the texture it uses, and then try to change that texture in a photo editing program like Photoshop or The Gimp to make it white or more white if you don't want the colors to be too strongly "typed".

Thats what I do in my map with the teleport sfx model, as I use it for towers upgrades with the player color rather than the usual blue.

Yeah, this is what I was looking for.
I know how to index, and the model I'm using is completely white (it's the arrow model that appears when you rightclick the ground) so no need to worry about the color being slightly off.
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
Lol :D

Yes sorry just found out who you were, I'm pretty new here ^^

Amazing SFX by the way !!!

Tsss me telling a talented modeler how to find a texture in a model.... joke of the century !
 
Status
Not open for further replies.
Top