Fixed | Applying gradient to icon background
The problem
I am currently experiencing problems with gradients.
I want to get back the gradient to the icon as whole but it just won’t let me.
old icon:
new icon:
icon code:
local Menu_icon = Icon.new()
:setName(IconIndex)
:setLabel("Menu")
:setOrder(-1)
:modifyTheme({
{ "IconCorners", "CornerRadius", UDim.new(0.25, 0) },
{ "IconImageCorner", "CornerRadius", UDim.new(0.25, 0) },
{ "IconImageScale", "Value", .8 },
{ "PaddingLeft", "Size", UDim2.new(0, 2, 1, 0) },
{ "IconGradient", "Enabled", true },
{ "IconGradient", "Color", script:FindFirstChild("MenuGradient").Color }
})
:setCaption("Return to menu.")
Any ideas as to what am I doing wrong?
Nevermind!
Solution
I have just realized where the problem is. To anyone else looking for the answer, do not forget to change the background color to white! Same as recoloring images to any color works only when the image is white, same goes with gradients. (Black can’t be even darker.)
local Menu_icon = Icon.new()
:modifyTheme({
{ "IconButton", "BackgroundColor3", Color3.new(1, 1, 1) },
{ "IconGradient", "Enabled", true },
{ "IconGradient", "Color", script:FindFirstChild("MenuGradient").Color }
})