Frame:GetBackgroundColor()

From Riftui Wiki

Jump to: navigation, search

Returns the Red, Green, Blue, and Alpha values of the frame's background color. Each value is a number from 0 to 1.

For more, see Frame:SetBackgroundColor()

Contents

Signature

r, g, b, a = frame:GetBackgroundColor()

Parameters

None

Return Value

A series of numbers for red, green, blue, and alpha values on the frame's background color. The numbers are between 0.00 and 1.00, with 0 being non-existant and 1 being fully existant.

Example

local context = UI.CreateContext("SampleContext")
local frame = UI.CreateFrame("Frame", "SampleFrame", context)
-- Get the current colors and alpha --
local r, g, b, a = frame:GetBackgroundColor()
-- if the frame was true blue and opaque,
-- you would get 0, 0, 1, 1 as your return values
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox