Can this game message have colour?

Caist

New Member
Reaction score
0
Hello!

Well, I would like to change the colour of this text (See: attachments) that appears to Yellow.
How can I do it?

Thanks!
 

Attachments

  • wc trigger #3.png
    wc trigger #3.png
    9.8 KB · Views: 230

Wratox1

Member
Reaction score
22
You need to use the colorcodes tha wc3 uses.

here is an example:

|cFFFF00Example|r

this will make the text "Example" yellow

breaking the colorcode into smaller pieces:

the first character is not the capital letter "i" or the lowercase letter "L", dont remember its name(but you make it by pressing down CTRL + ALT + the key to the left of Z(the one you make < and > characters with))

the second character, "c", defines that it is a colorcode(combined with the first character)

then comes the hexadecimal colorcode(which start after the "c"):

(using the colorcode from the example)

FF - red value

FF - green value

00 - blue value

the values ranges from 0-F meaning 0 being zero and F being max(the 0 is actually the character zero)

so, to make your game message display in yellow color, you need to add a concatenate string before your whole string and put the colorcode there
lie this:

Trigger:
  • Game - Display to (All players) the text: (|cFFFF00 + (String((0.00 + (1.00 x (Life of ENDGAME ALLY 1359 &lt;gen&gt;))))))
 

PrisonLove

Hard Realist
Reaction score
78
You need to use Hex color codes and concatenate the strings. We need three parts:

|cffaabbcc + Your Message Here + |r

The first part determines the color of the message
The second part is obviously what you want to display
The last part is the end to the color. If you leave it out, all messages will be in your color until '|r' is reached.

For the first part the '|c' signifies that you are starting a hex color code.
The first two letter 'ff' in this case, are your transparency. You'll most likely always use ff (the full amount).
The next two 'aa' in this case, are the red value
the next 'bb' in this case, are the green value
the final 'cc' in this case are the blue value

as the extremes.
|cffffffff will be white
|cff000000 will be black
|cffff0000 will be pure red
|cff00ff00 will be pure green
|cff0000ff will be pure blue

And I think |cffffcc00 is the gold color that Blizzard uses in tooltips.

So if you open an ability and look at the tooltip it looks like: |cffffcc00Blizzard - [Level 1]|r

You have from 0 - 9 to work with and from a - f (which is actually 10 - 15)

That was probably much more info than you needed, the charts will help you pick color better, but I hope you at least get a better understanding of what's going on.
 
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