Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

UI Escape Sequences

From WoW Classic Wiki

Many UI elements that display text on the screen support a special escape sequence.

Most likely to prevent interference with the C / LUA escape sequences, Blizzard decided to start those sequences with the pipe character (|).

Supported Escape Sequences

|cAARRGGBB
Sets text color. Text following this escape sequence will be drawn in this color. Each pair of digits represents a color value (plus the alpha value) as a hexadecimal number.
  • |cFFFF0000 - Red text
  • |cFF00FF00 - Green text
  • |cFF0000FF - Blue text
  • |cFF00FFFF - Yellow text
  • etc.
|r
Reset the color, all text following this sequence will be drawn in the default color of the text.
|Hlinkid|hLinktext|h
for Hyperlinks, while the only currently known links are item-links and player links
|Hitem:ItemID|hLinktext|h
for Item Links (It seems ItemID here must be the full Item-Id, ie. d:d:d:d style)
|Hplayer:Name|hLinktext|h
for Player Links (Click to whisper, CTRL-Click to select and Shift-Click to do a /Who Name)
|n
Possibly as newline in some cases.
||
Output "|" regardless of if whatever follows it looks like a valid escape.


A "|" followed by something that is not a valid escape sequence will be displayed as-is.

Examples

Text color

|cFFFF0000This is red text |rthis is normal color

Should result in

This is red text this is normal color

Gotchas

If you are using an in-game text editor, it is not wholly unlikely that the editor is trying to being "helpful" by replacing "|" with "||" for you without you seeing it. If you are trying to use escape sequences and just keep getting pipe chars, that's why. Try using "\124" instead of "|". 124 is the ascii code escape for the pipe character, and will work regardless of what your editor is trying to do.