From Riftui Wiki
Sets the background color for the frame.
Each value passed for red, green, and blue are considered a percentage. When working with a color picker, you can obtain this value by simply dividing each value by 255.
frame:SetBackgroundColor(red, green, blue [, alpha])
- red (number) - A value between 0 and 1.
- green (number) - A value between 0 and 1.
- blue (number) - A value between 0 and 1.
- alpha (number) - An optional value between 0 and 1. 0 is transparent, 1 is opaque. Setting a value of 0 makes the frame invisible, but in this case, it is preferable to use SetVisible(false) instead.
local context = UI.CreateContext("SampleContext") local frame = UI.CreateFrame("Frame", "SampleFrame", context) -- Set the background color to Red -- frame:SetBackgroundColor(1, 0, 0, 1)