Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API ColorMixin WrapTextInColorCode

Last wiki revision 2020-07-12

Wraps a string with and escape sequences. wrappedText = WrapTextInColorCode(text, colorHexString) wrappedText = color:WrapTextInColorCode(text)

  • text : - The text to wrap
  • colorHexString : - followed by six hexadecimal digits as RRGGBB like the return from.
  • wrappedText : - with the appropriate values inserted for RR, GG, BB and text.
  • Operates as a standalone function with two arguments, or as a method of ColorMixin with one argument.

print("Did someone say " .. WrapTextInColorCode("yellow", "ffffff00") .. "?") -- Did someone say yellow ?

Source

https://warcraft.wiki.gg/wiki/API_ColorMixin_WrapTextInColorCode · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.