The API is no longer being updated here until further notice. |
Sets the texture to a solid color.
TextureBase:SetColorTexture(colorR, colorG, colorB [, a])
Arguments[]
- colorR
- number
[0.0 - 1.0]
- Red component. - colorG
- number
[0.0 - 1.0]
- Green component. - colorB
- number
[0.0 - 1.0]
- Blue component. - a
- number?
[0.0 - 1.0]
= 1.0
- Alpha component (1.0 is opaque, 0.0 is transparent).
Example[]
Shows a half transparent yellow square.
local tex = UIParent:CreateTexture()
tex:SetPoint("CENTER")
tex:SetSize(64, 64)
tex:SetColorTexture(1, 1, 0, .5)
Patch changes[]
Patch 7.0.3 (2016-07-19): Added.