API Region GetAlpha

s, abstract rectangular areas on the screen to position user interface elements, provide two methods to determine the current alpha affecting the region's opacity:
 * GetAlpha returns the opacity relative to the region's immediate parent; this is the same value defined using (alpha)
 * GetEffectiveAlpha returns the net opacity that is the product of the region's alpha and that of its parents

alpha = region:GetAlpha effectiveAlpha = region:GetEffectiveAlpha

Returns

 * alpha : Number - The region's set opacity as a proportion of its immediate parent (if it has one)
 * effectiveAlpha : Number - The region's net opacity, inclusive of its parent's effective alpha

Example
The following example shows how opacity extends from one frame to its children local parent = CreateFrame("Frame") local child = CreateFrame("Frame", nil, parent) parent:SetAlpha(0.5) child:SetAlpha(0.5) print(child:GetAlpha)                         -- 0.5 print(child:GetEffectiveAlpha)                -- 0.25

It is possible, albeit inefficient and unnecessary, to compute the effective alpha using GetAlpha alone function ComputeEffectiveAlpha(region) local alpha = 1 while region do                           alpha = alpha * region:GetAlpha if (region:IsIgnoringParentAlpha) then return alpha end region = region:GetParent end return alpha end