mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
api: add fallback color to gradients
This commit is contained in:
+2
-1
@@ -852,7 +852,8 @@ end
|
||||
-- return r,g,b and hexcolor
|
||||
local gradientcolors = {}
|
||||
function pfUI.api.GetColorGradient(perc)
|
||||
if perc < 0 or perc > 1 then return nil,nil,nil,nil end
|
||||
-- fallback to black on bad numbers
|
||||
if perc < 0 or perc > 1 then return 0,0,0,"|cff000000" end
|
||||
|
||||
if not gradientcolors[perc] then
|
||||
local r1, g1, b1, r2, g2, b2
|
||||
|
||||
Reference in New Issue
Block a user