Sets a color shading for the region's graphics. The effect of changing this property differs by the type of region:
For
FontStrings, this color overrides the normal text color (as set by
FontInstance:SetTextColor()).
For
Textures, this color acts as a filter applied to the texture image: each color component value is a factor by which the corresponding component values in the image are multiplied. (See examples.)
Signature:
Code
LayeredRegion:SetVertexColor(red, green, blue [, alpha])
Arguments:
- red - Red component of the color (0.0 - 1.0) (number)
- green - Green component of the color (0.0 - 1.0) (number)
- blue - Blue component of the color (0.0 - 1.0) (number)
- alpha - Alpha (opacity) for the graphic (0.0 = fully transparent, 1.0 = fully opaque) (number)
Examples:
-- first, target an elite creature or NPC so the "gold dragon" target border appears
-- then try running the following scripts:
TargetFrameTexture:SetVertexColor(1,0,0)
-- omits the green and blue channels from the image, giving it a red tint
TargetFrameTexture:SetVertexColor(0,0,1)
-- omits the red and green channels from the image: note the image is mostly black,
-- as the gold color of the dragon image comes primarily from red and green channels
TargetFrameTexture:SetVertexColor(0,0,0)
-- omits all color channels, leaving a black shadow defined by the image's alpha channel
TargetFrameTexture:SetVertexColor(1,1,1)
-- removes vertex shading, returning the image to its original colors