So I'm trying to create a smooth transition between Color3 values, in a rainbow-like effect. I've come up this conclusion:
local function TweenColor(gui,new,prop,time)
local v = gui[prop]
time = time * 30
local saved = {
r=new.r-v.r;
g=new.g-v.g;
b=new.b-v.b;
}
for i = 1,time do
gui[prop] = Color3.new(
gui[prop].r+saved.r/time,
gui[prop].g+saved.g/time,
gui[prop].b+saved.b/time
)
wait()
end
end
This will tween color A, to color B very smoothly. However, I still have yet to figure out a compact way to make a rainbow effect and have the function tween through all it's colors.
If anyone knows a good way to accomplish this, I'd very much appreciate it. Thanks.

1 comment
well a rainbow starts at red and goes to blue so start increasing red then increasing green and decreasing red and then the same with blue maybe