Please feel free to comment, though I searched around quite a bit, through code and wowwiki, and hadn't found any reference to this, or my particular method of it.
If there's a better way please let me know.
First off my goal was simple, display the colors for the classes and spell schools, based off the default blizzard api.
When I looked for some examples, I only found pre-defined color schemes, which referenced the global spell school type in the local scope, or table retrieved values stored in a database.
So after some digging through some code, I found some things out I didn't know nor had seen referenced.
Anyway, I hope this helps anyone else looking for the same or similar references to global functions and values.
name = function(colorType)
local myStringValue = ""
local schoolColors = COMBATLOG_DEFAULT_COLORS.schoolColoring
if colorType == "school" then
for key,value in pairs(schoolColors) do
myStringValue = myStringValue .. string.format("|cff%.2x%.2x%.2x%s Spell|r\n", value.r*255, value.g*255, value.b*255, _G.CombatLog_String_SchoolString(key))
elseif colorType == "class" then
for key, value in ipairs(CLASS_SORT_ORDER) do
local classColor = RAID_CLASS_COLORS[value];
myStringValue = myStringValue .. string.format("|cff%.2x%.2x%.2x%s Spell|r\n", classColor.r*255, classColor.g*255, classColor.b*255, LOCALIZED_CLASS_NAMES_MALE[value])