Quantcast
WoWInterface - View Single Post - Code optimization and issue with hyperlinks in chat
View Single Post
10-24-18, 01:37 PM   #10
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 105
You might find some of the code in Blizzard's Util.lua handy. Notably there is a ColorMixin that converts to Hex, a Clamp function, and a WrapTextInColorCode function.

RAID_CLASS_COLORS also already has the color in hex format as the .colorStr so you can save some computation by using that rather than clamping multiple values and reformatting the result.
  Reply With Quote