Skip to content

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 button
How 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.

  • Color is a ColorSequence: a list of keypoints, each a time from 0 to 1 and a Color3.
  • Transparency is a NumberSequence with the same idea, for fades.
  • Rotation turns the gradient in degrees. 90 runs top to bottom.
  • Offset slides 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.