Originally Posted by Phanx
That works, although I'm not sure why you would want to use an indexed table based on Blizzard's arbitrary and unintuitive CLASS_SORT_ORDER values, instead of a hash table with class/color pairs.
|
My Hobby: re-sorting CLASS_SORT_ORDER to be alphabetical, with makes 70% of addons list their class-related things in a nice alphabetical intuitive way, and the remaining 30% puke horribly because of poor assumptions.
As for RAID_CLASS_COLORS, it looks like they adopted their (smart) current idea of "ITEM_QUALITY_COLORS[n].hex", but called the field "colorStr" instead of "hex". But colorStr includes the leading "ff" value, where "hex" includes the entire "|cff" escape-sequence-plus-ff value.
(Curious: Is "colorStr" ever used in Blizzard's code without unconditionally prefixing the |c escape? Brief investigation says not. Maybe they plan to do other things with it.)