Both
Lua Code:
for _, colorTable in pairs(RAID_CLASS_COLORS) do
and
Lua Code:
local colorTable = RAID_CLASS_COLORS[class]
are making changes directly into the global RAID_CLASS_COLORS table. That will change the colour for everything else in the UI using RAID_CLASS_COLORS and it will always be black for everything.
All your actions in both PLAYER_LOGIN and UNIT_AURA just keep changing this global table's colours to black again and again....
Lua Code:
colorTable.r, colorTable.g, colorTable.b = 0, 0, 0
is exactly the same as:
Lua Code:
RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b = 0, 0, 0
and
Lua Code:
colorTable.r, colorTable.g, colorTable.b = RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b
is exactly the same as:
Lua Code:
RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b = RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b
You need to work at the point you want to set the colour of a texture and decide what you want to do with colouring.
eg:
Lua Code:
local classColor = RAID_CLASS_COLORS[class]
if hasPowerWordShield then
sometexture:SetVertexColor(classColor.r, classColor.g, classColor.b) -- use default
else
sometexture:SetVertexColor(0, 0, 0) -- set to black
end
And don't do anything at PLAYER_LOGIN