Currently I run a version where I change the Alpha to 0.2 on my Icons if they are not active.
To make something grey you need to use the "SetVertexcolor()"-function. (
API LayeredRegion SetVertexColor - WoWWiki - Your guide to the World of Warcraft).
This function can only be used on special layers, textures are one of those and our icon-texture will work.
We need to give our icon-texture a unique name so we can call it, currently the icon-texture is unnamed (nil).
Find:
--create icon texture
local t = f:CreateTexture(nil,"BACKGROUND")
t:SetTexture(SpellIcon)
t:SetTexCoord(0.1,0.9,0.1,0.9)
t:SetAllPoints(f)
f.texture = t
Change it to:
--create icon texture
local t = f:CreateTexture(frameName.."_icon","BACKGROUND")
t:SetTexture(SpellIcon)
t:SetTexCoord(0.1,0.9,0.1,0.9)
t:SetAllPoints(f)
f.texture = t
Now you could change the color whereever you want like this:
local f4 = _G["rf2_"..frameTag.."_icon"] -- frametag is the unique tag of that spell
f4:SetVertexColor(0.3,0.3,0.3)