WO

wow-api-escape-sequences

Provides a comprehensive guide to WoW UI escape sequences for text formatting, colors, textures, and grammar rules in addon development.

Install

mkdir -p .claude/skills/wow-api-escape-sequences && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16620" && unzip -o skill.zip -d .claude/skills/wow-api-escape-sequences && rm skill.zip

Installs to .claude/skills/wow-api-escape-sequences

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Complete reference for World of Warcraft UI escape sequences — pipe-character sequences embedded in text strings to produce colors, inline textures, atlas icons, grammar inflections, word-wrap hints, Kstrings, and other special rendering. Use when formatting chat output, tooltip text, FontString content, or any UI text that needs color codes, inline icons, named colors, item-quality colors, texture markup, atlas markup, localized grammar forms, or escape-sequence utilities like WrapTextInColorCode, CreateTextureMarkup, CreateSimpleTextureMarkup, and CreateAtlasMarkup.
574 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Embed ARGB hex color codes in text
  • Use named global colors in text
  • Apply item quality colors to text
  • Insert inline textures into FontStrings
  • Insert texture atlas regions into text
  • Apply localized grammar rules to text

How it works

This skill documents pipe-character escape sequences that can be embedded in Lua strings to produce special rendering effects like colors, inline textures, and grammar inflections in the WoW UI.

Inputs & outputs

You give it
text string for WoW UI with desired special rendering
You get back
Lua string with pipe-character escape sequences for WoW UI

When to use wow-api-escape-sequences

  • Add color codes to tooltip text
  • Insert icons into chat messages
  • Apply localized grammar rules to strings
  • Implement texture markup in FontStrings

About this skill

WoW UI Escape Sequences

This skill documents the UI escape sequences available in World of Warcraft addon development. Many UI elements that display text on screen support special sequences starting with the | (pipe) character. These sequences enable inline coloring, texture/atlas rendering, grammar inflection, word-wrapping hints, and more — all within ordinary Lua strings.

Source of truth: https://warcraft.wiki.gg/wiki/UI_escape_sequences Current as of: Patch 12.0.0 (Retail only) Scope: All | escape sequences recognized by the WoW UI text renderer.

When to Use This Skill

Use this skill when you need to:

  • Embed color codes in chat messages, tooltips, or FontStrings
  • Use named global colors (|cn) or item-quality colors (|cnIQ)
  • Insert inline textures or atlas icons into text
  • Apply localized grammar rules (Korean, French, Russian, plurals, articles)
  • Understand word-wrap hints (|W) or Kstring obfuscation (|K)
  • Use helper functions like WrapTextInColorCode(), CreateTextureMarkup(), CreateSimpleTextureMarkup(), or CreateAtlasMarkup()

Relationship to Other Skills

SkillRelationship
wow-api-framexmlCovers utility functions (WrapTextInColorCode, CreateTextureMarkup, CreateSimpleTextureMarkup, CreateAtlasMarkup) that generate escape-sequence markup from Lua.
wow-api-widgetFontString, EditBox, SimpleHTML, GameTooltip and other text-displaying widgets render these sequences.
wow-lua-apiLua string.format, print(), and chat functions emit strings that can contain these sequences.

Important: The Pipe Character

In Lua source code you can use | directly:

print("|cFFFF0000Red text|r normal")

In the chat window or in-game text editors, the literal | is escaped. Use \124 (the ASCII code for pipe) instead:

/run print("\124cFFFF0000Red text\124r normal")

Coloring

ARGB Hex Color

|cAARRGGBBtext|r
  • AA — Alpha (currently ignored; always use FF).
  • RR GG BB — Red, green, blue channels as two hex digits each.
  • |r — Pops the most recent color, restoring the previous one (since Patch 9.0.1). Previously it reset to the default color entirely.

Nesting example:

print("white |cFFFF0000red |cFF00FF00green|r back to red|r back to white")

Global Named Colors (|cn)

|cnCOLOR_NAME:text|r

Renders text using a named GlobalColor. The color name comes from the GlobalColor database table.

print("|cnPURE_GREEN_COLOR:Green text|r normal")

Item Quality Colors (|cnIQ)

|cnIQn:text|r

Renders text using the color for item quality n, where n is a numeric Enum.ItemQuality value (0 = Poor/gray, 1 = Common/white, 2 = Uncommon/green, 3 = Rare/blue, 4 = Epic/purple, 5 = Legendary/orange, …). The color updates to match the user's color-override settings.

print("|cnIQ4:Epic quality text|r")

Added in Patch 11.1.5. Named colors (|cn) added in Patch 10.0.0.


Textures

Inline Texture

|Tpath:height[:width[:offsetX:offsetY[:textureWidth:textureHeight:leftTexel:rightTexel:topTexel:bottomTexel[:rVertexColor:gVertexColor:bVertexColor]]]]|t

Inserts an image into a FontString. path may be a file path (with / or \\ separators) or a numeric FileDataID.

Size Rules

heightwidthResult
0omittedSquare icon at text line height (TextHeight × TextHeight)
> 0omittedSquare icon (height × height)
00Square at TextHeight
> 00TextHeight wide, height tall
0> 0width is treated as an aspect ratio: Width = width × TextHeight, Height = TextHeight
> 0> 0Explicit width × height

Optional Parameters

ParameterPurpose
offsetX, offsetYPixel offset from the natural position
textureWidth, textureHeightSource image dimensions in pixels
leftTexel, rightTexel, topTexel, bottomTexelCrop coordinates in pixels (non-normalized x1 x2 y1 y2; see Texture:SetTexCoord)
rVertexColor, gVertexColor, bVertexColorRGB tint values, each 0–255

Common Patterns

-- Square icon at text size (most common for spell/item icons)
"|T133784:0|t"
"|TInterface/Icons/INV_Misc_Coin_01:0|t"

-- Explicit 16×16 icon
"|TInterface/Icons/INV_Misc_Coin_01:16|t"

-- Rectangular image with aspect ratio
"|TInterface/Glues/LoadingBar/Loading-BarFill:0:2|t"

-- Cropped texture (4px border removed from a 64×64 source)
"|TInterface/Icons/INV_Misc_Coin_01:16:16:0:0:64:64:4:60:4:60|t"

-- Tinted texture (green tint: 73,177,73)
"|TInterface/ChatFrame/UI-ChatIcon-ArmoryChat:14:14:0:0:16:16:0:16:0:16:73:177:73|t"

Texture Atlas

|A:atlas:height:width[:offsetX:offsetY[:rVertexColor:gVertexColor:bVertexColor]]|a

Inserts a texture atlas region. The atlas may be a name string or a numeric atlas ID. Note the : after |A.

-- Atlas by name
"|A:groupfinder-icon-role-large-tank:19:19|a Tank"

-- Atlas by numeric ID
"|A:4259:19:19|a Tank"

See also: AtlasID


Kstrings

|Kq1|k

Kstrings are opaque string placeholders that prevent addon parsing of confidential or protected text. They are rendered by the client as the actual display string but cannot be read as plaintext by addons.

PrefixUsage
qBattle.net account names (C_BattleNet.GetFriendAccountInfo)
rGroup finder listing names/comments (C_LFGList.GetSearchResultInfo, C_LFGList.GetActiveEntryInfo)
uCommunities message content (C_Club.GetMessageInfo, C_Club.GetMessagesInRange)
vCommunities channel chat (CHAT_MSG_COMMUNITIES_CHANNEL event)

Added in Patch 4.0.1.


Grammar / Localization Sequences

These sequences handle language-specific inflection so that a single localization string can produce grammatically correct output.

|1 — Korean Postpositions

text|1A;B;

Selects postposition A (after consonant) or B (after vowel).

print("라면|1을;를;")  -- 라면을 (ramyeoneul)
print("나무|1을;를;")  -- 나무를 (namureul)

|2 — French Prepositions

|2 text

Outputs de text before a consonant, d'text before a vowel. Trailing spaces after |2 are ignored.

print("|2 fraise") -- de fraise
print("|2 avion")  -- d'avion

|3 — Russian Noun Declension

|3-id(text)

Declines a Russian noun into one of 5 cases (id = 1–5).

print("|3-1(Кролик)") -- Кролика   (Genitive)
print("|3-2(Кролик)") -- Кролику   (Dative)
print("|3-3(Кролик)") -- Кролика   (Accusative)
print("|3-4(Кролик)") -- Кроликом  (Instrumental)
print("|3-5(Кролик)") -- Кролике   (Prepositional)

See also: DeclineName() API.

|4 — Plural Forms

number |4singular:plural;
number |4singular:plural1:plural2;   -- ruRU has three forms

Selects singular or plural based on the preceding number.

print("1 |4car:cars;")      -- 1 car
print("2 |4car:cars;")      -- 2 cars
print("3 blue |4car:cars;") -- 3 blue cars

|7 — Plural (Large Numbers / Non-English)

Same behavior as |4 but used specifically with large numbers on certain non-English locales.

print("1 |7Million:Millionen;") -- 1 Million
print("2 |7Million:Millionen;") -- 2 Millionen

|5 — Indefinite Article (a / an)

|5 text
|5^ text   -- uppercase article

Inserts a before consonant sounds, an before vowel sounds.

print("|5 banana")  -- a banana
print("|5 apple")   -- an apple
print("|5^ apple")  -- An apple

|6 — Lowercase

|6 TEXT
|6(TEXT MORE)

Converts the next word (or parenthesized group) to lowercase.

print("|6 HELLO WORLD")  -- hello WORLD
print("|6(HELLO WORLD)") -- hello world

Word Wrapping

|Wtext|w

Hints that the enclosed text should not be broken across lines. If the text would require wrapping, the client prefers to wrap before the |W start instead of splitting inside it. If the text is still too wide, the hint may be ignored.

Added in Patch 5.4.1.


Other Sequences

SequenceEffect
|nNewline (if the widget supports it). Equivalent to \n or \r.
||Literal pipe character |.
Any invalid |XDisplayed as-is (undefined behavior).

Utility Functions (FrameXML)

These FrameXML helper functions generate escape-sequence markup:

FunctionOutput
WrapTextInColorCode(text, colorHexString)|cFFRRGGBBtext|r
CreateTextureMarkup(file, fileW, fileH, width, height, left, right, top, bottom)|T...|t with tex coords
CreateSimpleTextureMarkup(file, width, height)|Tfile:height:width|t
CreateAtlasMarkup(atlasName, height, width, offsetX, offsetY)|A:atlas:height:width:...|a
-- Color a string red
WrapTextInColorCode("Critical!", "FFFF0000")
-- "|cFFFF0000Critical!|r"

-- Inline 16×16 coin icon
CreateSimpleTextureMarkup("Interface/Icons/INV_Misc_Coin_01", 16, 16)
-- "|TInterface/Icons/INV_Misc_Coin_01:16:16|t"

-- Atlas tank icon
CreateAtlasMarkup("groupfinder-icon-role-large-tank", 16, 16)
-- "|A:groupfinder-icon-role-large-tank:16:16|a"

Patch History

PatchChange
11.1.5Added |cnIQ item quality color sequences.
10.0.0Added |cn named color sequences.
9.0.1|r now pops nested colors in-order instead of resetting to default.
5.4.1Added |W word-wrapping hint.
4.0.1Added |K Kstrings.

See Also

  • Hyperlinks — related pipe-delimited link sequences (|H...|h...|h).
  • wow-api-framexml skill — covers WrapTextInColorCode, `CreateTextureMarkup

Content truncated.

When not to use it

  • When the text does not require special rendering
  • When working with hyperlinks, which have their own sequences

Limitations

  • The scope is limited to `|` escape sequences recognized by the WoW UI text renderer.
  • The skill is current as of Patch 12.0.0 (Retail only).

How it compares

This skill provides a specific reference for WoW UI escape sequences, enabling advanced text formatting not possible with plain Lua strings.

Compared to similar skills

wow-api-escape-sequences side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
wow-api-escape-sequences (this skill)06moNo flagsIntermediate
deepwiki-rs259moReviewIntermediate
codex-cli-bridge99moReviewIntermediate
skill-development179moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

deepwiki-rs

sopaco

AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.

25170

codex-cli-bridge

alirezarezvani

Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools

9180

skill-development

anthropics

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

17145

skill-writer

pytorch

Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.

27126

openapi-spec-generation

wshobson

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

22122

korean-skill-creator

clwmfksek

한글 기반 클로드 스킬 자동 생성 도구. 사용자가 "클로드 스킬을 만들어줘" 또는 "[요구사항] 스킬 만들어줘"라고 요청할 때 사용. Progressive disclosure 원칙을 따르는 한글 문서 구조(SKILL.md + references/)를 자동으로 생성하고, 실전 예시를 포함한 일관성 있는 스킬 템플릿을 제공.

8132

Search skills

Search the agent skills registry