UI escape sequences

Many UI elements that display text on the screen support a special escape sequences starting with the | pipe character.

If you are using the chat window or an in-game text editor, then  will most likely be replaced with. Try using  instead of. 124 is the ASCII code escape for the pipe character, and will work regardless of what the editor is trying to do.

Coloring
|cAARR GG BB text|r
 * Each pair of digits represents a color value (plus the alpha value, however the alpha value is currently ignored and should always be FF) as a hexadecimal number. The  escape sequence pops nested color sequences in-order.

/run print("this is \124cFFFF0000red and \124cFF00FF00this is green\124r back to red\124r back to white") > this is red and this is green back to red back to white

Classic

/run print("this is \124cFFFF0000red and \124cFF00FF00this is green\124r back to white") > this is red and this is green back to white

Textures
|Tpath :height [:width [:offsetX :offsetY :[textureWidth :textureHeight :leftTexel:rightTexel:topTexel:bottomTexel[:rVertexColor :gVertexColor :bVertexColor ]]]]|t
 * Will insert a texture into a font string. Parameter  is optional (see below). The offsets are optional and will shift the texture from where it would normally be placed.   is based on size of the font used - this is used to automatically scale icons based on the size of the text.
 * (always square!)
 * (always square!)
 * (always square!)
 * (height is height!!!)
 * (width is an aspect ratio and defines width!!!)
 * Offset for the rendered image, in pixels
 * Size of the source image, in pixels
 * Coordinates that identify the left/right/top/bottom edges, in pixels (see but non-normalized)
 * RGB color values in the range 0-255 that are used to tint the texture
 * Notes:
 * When you need to display a square icon in the string (spell/item icon), use only
 * When you need to display a rectangular image in the string (Blizzard logo), use aspect ratio version:
 * When you need to display a rectangular image in the string (Blizzard logo), use aspect ratio version:

Texture atlas
Atlases allow for easily getting part of a texture without having to use tex coords. |Aatlas :height :width [:<font color="#ff8080">offsetX :<font color="#ff8080">offsetY ]|a

Examples


 * Utility functions:
 * WrapTextInColorCode
 * ColorMixin:WrapTextInColorCode - Adds the color escape sequences from a ColorMixin.
 * CreateTextureMarkup
 * CreateAtlasMarkup

Protected strings
Also known as Kstrings, they prevent strings from being parsed in addons.


 * Battle.net
 * The  variant e.g.   is used for the confidentiality of Battle.net account names. The number represents the Battle.net friend ID.
 * Known sources: 


 * Group Finder
 * The  variant e.g.   is used for the name and comment in group finder listings to prevent addons like World Quest Group Finder.
 * Known sources: and 


 * Communities
 * The  variant e.g.   is used for Community Channels to prevent addons from using it as a shared, persistent data storage. The number represents a chat message line ID.
 * Known sources: 

Grammar

 * : Will choose a word depending on whether the digit preceding it is 0/1 or not (i.e. 1,11,21 return the first string, as will 0,10,40). Note that unlike |4 singular and plural forms are separated by semi-colon.
 * : Before vowels outputs d' (with apostrophe) and removes any leading spaces from text, otherwise outputs de  (with trailing space)
 * : Displays text declined to the specified form (index ranges from 1 to ). Processed by C code, data used for parsing isn't available to UI, all events fire with the data already processed.
 * -or- : Will choose a form based on the number preceding it. Client locale dependant. More than two forms (separated by colons) may be required by some locales (i.e. Russian requires 3 forms), if too many forms provided they are ignored, if needed form isn't provided empty string will be used instead.  Note that unlike |1 singular and plural forms are separated by colon. (added with 2.4.2)

Other

 * : Newline, if the widget supports it. Similar behavior as


 * : Escapes the "|" character.


 * : "|" followed by something that is not a valid escape sequence will be displayed as-is or is otherwise undefined behavior.

Hyperlinks

 * ''See also: and ExtractHyperlinkString.
 * Implemented in FrameXML/ItemRef.lua

Hyperlinks are clickable (chat) links. Since patch 7.0.3 unused delimited segments will be empty rather than 0, e.g.  instead of   |c<font color="#ecbc2a">ffxxxxxx |H<font color="#ecbc2a">linkType :<font color="#ecbc2a">info |h[<font color="#ecbc2a">text ]|h|r

Each kind of hyperlink has the following format:

The server may expect certain combinations of color, payload and text as can reject invalid entries.

achievement
achievement : <font color="#ecbc2a">achievementID : <font color="#ecbc2a">guid : <font color="#ecbc2a">completed : <font color="#ecbc2a">month : <font color="#ecbc2a">day : <font color="#ecbc2a">year : <font color="#ecbc2a">criteria1 : <font color="#ecbc2a">criteria2 : <font color="#ecbc2a">criteria3 : <font color="#ecbc2a">criteria4
 * The player's GUID.
 * 1 for earned, 0 for unearned achievements.
 * Date the achievement was earned or 0:0:-1 if not earned.
 * 32-bit bitmask fields for completed criteria, or 0:0:0:0 if not completed.
 * Example:

api
Shows API Documentation from the /api command. api : <font color="#ecbc2a">type : <font color="#ecbc2a">name : <font color="#ecbc2a">[parentName]
 * Example:

azessence
Azerite Essence link azessence : <font color="#ecbc2a">essenceID : <font color="#ecbc2a">rank
 * Example:
 * See also:

battlepet
battlepet : <font color="#ecbc2a">speciesID : <font color="#ecbc2a">level : <font color="#ecbc2a">breedQuality : <font color="#ecbc2a">maxHealth : <font color="#ecbc2a">[power] : <font color="#ecbc2a">[speed] : <font color="#ecbc2a">[battlePetID] : <font color="#ecbc2a">[displayID]
 * Example:
 * Barebone example:
 * See also: BattlePetSpeciesID

battlePetAbil
battlePetAbil : <font color="#ecbc2a">abilityID : <font color="#ecbc2a">maxHealth : <font color="#ecbc2a">power : <font color="#ecbc2a">speed
 * Example:

calendarEvent
calendarEvent : <font color="#ecbc2a">monthOffset : <font color="#ecbc2a">monthDay : <font color="#ecbc2a">index
 * Example:
 * See also:

channel
Opens the chat window to a specific /channel. channel : <font color="#ecbc2a">channelType : <font color="#ecbc2a">[channelID]
 * Example:

clubFinder
Guild Finder (8.2.5) invite link. clubFinder : <font color="#ecbc2a">clubFinderId
 * Example:
 * See also: GetClubFinderLink

clubTicket
WoW communities & Blizzard Groups invite link. clubTicket : <font color="#ecbc2a">ticketId
 * Example:
 * See also: GetClubTicketLink

community
Community link in Quick Join requests. community : <font color="#ecbc2a">clubId

conduit
Conduit link conduit : <font color="#ecbc2a">id : <font color="#ecbc2a">[rank]
 * Example:
 * See also:

currency
currency : <font color="#ecbc2a">id : <font color="#ecbc2a">[amount]
 * Example:

death
Opens the Death recap overview. death : <font color="#ecbc2a">recapID
 * Example:

enchant
Opens the Tradeskill window for a recipe. enchant : <font color="#ecbc2a">spellID
 * Example:

garrfollower
garrfollower : <font color="#ecbc2a">followerID : <font color="#ecbc2a">quality : <font color="#ecbc2a">level : <font color="#ecbc2a">itemLevel : <font color="#ecbc2a">ability1 : <font color="#ecbc2a">ability2 : <font color="#ecbc2a">ability3 : <font color="#ecbc2a">ability4 : <font color="#ecbc2a">trait1 : <font color="#ecbc2a">trait2 : <font color="#ecbc2a">trait3 : <font color="#ecbc2a">trait4 : <font color="#ecbc2a">spec1
 * Example:

garrfollowerability
garrfollowerability : <font color="#ecbc2a">abilityID
 * Example:

garrmission
garrmission : <font color="#ecbc2a">missionID : <font color="#ecbc2a">missionDBID
 * Example:
 * Note: This link type can also be used for securely implementing custom links by posthooking  since it silently fails on non-numbers, whereas custom link types would error out. It does not work on actual chat messages through  as the server won't show the message.

print("|cFFFFFF00|Hgarrmission:SomeAddon:foo|h[Some Clickable Message]|h|r")

instancelock
Opens the /raidinfo list. instancelock : <font color="#ecbc2a">guid : <font color="#ecbc2a">instanceID : <font color="#ecbc2a">difficulty : <font color="#ecbc2a">defeatedEncounters
 * The player's GUID.
 * The instance's InstanceID
 * The instance's DifficultyID
 * Bitfield indicating the encounters that have been defeated. e.g. 7 means that the first 3 encounters have been cleared.
 * Example:

item
item : <font color="#ecbc2a">itemString
 * Example:

journal
Opens the Adventure Guide. journal : <font color="#ecbc2a">journalType : <font color="#ecbc2a">journalID : <font color="#ecbc2a">difficulty
 * 0=Instance, 1=Encounter, 2=Section.
 * InstanceID, EncounterID, or SectionID.
 * DifficultyID of the instance.
 * Example:
 * See also:
 * See also:
 * See also:
 * See also:

keystone
Used for Mythic Keystone. keystone : <font color="#ecbc2a">itemID : <font color="#ecbc2a">challengeModeID : <font color="#ecbc2a">level : <font color="#ecbc2a">affix1 : <font color="#ecbc2a">affix2 : <font color="#ecbc2a">affix3 : <font color="#ecbc2a">affix4
 * Example:
 * See also: MapChallengeMode.db2, KeystoneAffix.db2
 * See also: MapChallengeMode.db2, KeystoneAffix.db2
 * See also: MapChallengeMode.db2, KeystoneAffix.db2
 * See also: MapChallengeMode.db2, KeystoneAffix.db2

levelup
levelup : <font color="#ecbc2a">level : <font color="#ecbc2a">levelUpType : <font color="#ecbc2a">[petName]
 * Example:

lootHistory
Opens the /loot window. lootHistory : <font color="#ecbc2a">rollID

player

 * Left-click: starts a whisper message
 * Right-click: opens the player context menu
 * Shift-click: sends a /who query

player : <font color="#ecbc2a">name : <font color="#ecbc2a">[lineID] : <font color="#ecbc2a">[chatType] : <font color="#ecbc2a">[chatTarget]
 * Message ID for reporting.
 * Example:
 * See also: GetPlayerLink
 * See also: GetPlayerLink
 * See also: GetPlayerLink
 * See also: GetPlayerLink
 * See also: GetPlayerLink

playerCommunity
playerCommunity : <font color="#ecbc2a">name : <font color="#ecbc2a">communityClubID : <font color="#ecbc2a">communityStreamID : <font color="#ecbc2a">communityEpoch : <font color="#ecbc2a">communityPosition
 * Example:

BNplayer
Battle.net friend links. BNplayer : <font color="#ecbc2a">name : <font color="#ecbc2a">bnetIDAccount : <font color="#ecbc2a">lineID : <font color="#ecbc2a">chatType : <font color="#ecbc2a">chatTarget

BNplayerCommunity
BNplayerCommunity : <font color="#ecbc2a">name : <font color="#ecbc2a">bnetIDAccount : <font color="#ecbc2a">communityClubID : <font color="#ecbc2a">communityStreamID : <font color="#ecbc2a">communityEpoch : <font color="#ecbc2a">communityPosition

quest
quest : <font color="#ecbc2a">questID : <font color="#ecbc2a">questLevel : <font color="#ecbc2a">unknown1 : <font color="#ecbc2a">unknown2 : <font color="#ecbc2a">unknown3
 * Example:
 * See also: QuestLink
 * See also: QuestLink
 * See also: QuestLink

shareachieve
Opens the Twitter /share window for an achievement. shareachieve : <font color="#ecbc2a">achievementID : <font color="#ecbc2a">earned
 * Example:

shareitem
Twitter item link. shareitem : <font color="#ecbc2a">itemLink : <font color="#ecbc2a">earned
 * Example:

sharess
Twitter screenshot link. sharess : <font color="#ecbc2a">screenshotIndex
 * : index of the screenshot to autofill the Tweet with, counted from last login.
 * Example:

spell
spell : <font color="#ecbc2a">spellId : <font color="#ecbc2a">glyphId : <font color="#ecbc2a">[event]
 * Example:
 * See also:
 * See also:
 * See also:

storecategory
Opens the In-Game Store. storecategory : <font color="#ecbc2a">category
 * Example:

talent
talent : <font color="#ecbc2a">talentID
 * Example:
 * See also:

trade
Shows the tradeskill window (from another player). trade : <font color="#ecbc2a">guid : <font color="#ecbc2a">spellID : <font color="#ecbc2a">skillLineID
 * The player's GUID.
 * The tradeskill's Spell ID.
 * The TradeSkillLineID.
 * Example:
 * See also: TradeSkillLink

transmogappearance
transmogappearance : <font color="#ecbc2a">sourceID

transmogillusion
Previews a weapon enchant in the Dressing room. transmogillusion : <font color="#ecbc2a">sourceID
 * Example:
 * See also:

transmogset
transmogset : <font color="#ecbc2a">setID See also:

unit
Shows the unit tooltip. Opens the combat log context menu on right-click. unit : <font color="#ecbc2a">guid : <font color="#ecbc2a">[name]
 * Example:

Implemented in Blizzard_CombatLog.lua

urlIndex
Opens a URL in the default web browser. urlIndex : <font color="#ecbc2a">index
 * Example:

worldmap
Opens the World Map to display a pinned waypoint. worldmap : <font color="#ecbc2a">uiMapID : <font color="#ecbc2a">x : <font color="#ecbc2a">y


 * The UiMapID for the waypoint.
 * The X coordinate of the waypoint, multiplied by 10000.
 * The Y coordinate of the waypoint, multiplied by 10000.


 * Example:
 * enUS globalstring:
 * See also: