Thread: Color Textures
View Single Post
04-25-12, 03:39 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You don't need to modify the textures or create any additional frames/textures/etc. There are already API methods built into frames and textures for changing their colors

For frames whose visible textures are set as part of their backdrop, you can use:

Code:
frameObject:SetBackdropColor(r, g, b, a)
frameObject:SetBackdropBorderColor(r, g, b, a)
For actual texture objects (like the main menu bar art), you can use:

Code:
textureObject:SetVertexColor(r, g, b, a)
Note that if the texture is already colored (eg. not grayscale) then applying a vertex color may not have the exact results you expect. For example, if a texture is yellow, and you apply a blue vertex color, it will end up looking green.
  Reply With Quote