Hi! I’m trying to make reactive UIGradients using Fusion. I’m 90% sure Fusion is updating the color correctly, since it prints “compute”, and the colorSequence is also printing.
scope:New "UIGradient" {
Color = scope:Computed(function(use)
print("compute")
local colorSequence = ColorSequence.new({
ColorSequenceKeypoint.new(0, use(Theme.Dynamic.SecondaryBorder)),
ColorSequenceKeypoint.new(1, use(Theme.Dynamic.TertiaryBackground))
})
print(colorSequence)
return colorSequence
end),
Rotation = 90
}
I’m also pretty sure it’s not an issue with Theme.Dynamic since I’ve used it for every other Color3 (background colors, text colors, etc.) and it works perfectly.
Every color3 value in Theme.Dynamic is a :Spring() too, if that changes anything.
The UIGradient’s color isn’t changed at all, heres what the output looks like when I run the code above (and change the Theme)
compute
0 0.156863 0.156863 0.156863 0 1 0.0470588 0.0470588
... (repeats a bunch of these until it reaches the spring is finished)
compute
0 0.862745 0.862745 0.862745 0 1 1 1 0.999999 0