UIGradient generator
Add color stops, set the rotation and copy the code for a UIGradient.
20 stops the most a ColorSequence can hold · Checked October 16, 2026
- 0%
- 100%
local gradient = Instance.new("UIGradient")
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(196, 40, 28)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(245, 205, 48)),
})
gradient.Parent = script.Parent -- a Frame, ImageLabel or buttonHow it works
How UIGradient works
A UIGradient goes inside a GUI object (a Frame, TextLabel, ImageLabel or button) and tints it. It does not draw on its own: the parent needs a visible background or text. White parents show the gradient colors exactly, darker parents multiply them.
Coloris a ColorSequence: a list of keypoints, each a time from 0 to 1 and a Color3.Transparencyis a NumberSequence with the same idea, for fades.Rotationturns the gradient in degrees. 90 runs top to bottom.Offsetslides it, which is how animated shine effects are made.
Gradient text
Put the UIGradient inside a TextLabel and it colors the text. Keep the TextColor3 white so the gradient colors show at full strength.
Questions
How many colors can a UIGradient have?
A ColorSequence can hold up to 20 keypoints. The first must be at time 0 and the last at time 1.
Why is my gradient not showing?
Check that the parent has BackgroundTransparency below 1 (or visible text for a TextLabel), that the UIGradient is Enabled, and that the parent color is not black, which hides every tint.
How do I animate a gradient?
Tween the Offset (a Vector2) from (-1, 0) to (1, 0), or tween Rotation. The tween generator writes the TweenService code.