2 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

GradientType

Used alongside UIGradient.Type to set the shape of the gradient as linear, radial, or conical.

Items

NameValueDescription
Linear0The color/transparency sequence transitions in a straight line across the element. The direction is controlled by Rotation and the position by Offset.
Radial1The color/transparency sequence radiates outward from the element's center, optionally shifted by Offset. The radius is defined by the average of the element's width and height divided by two, effectively (width+height)/4. Rotation has no effect on a radial gradient.
Conical2The color/transparency sequence sweeps clockwise around the center of the element, optionally shifted by Offset. Rotation controls the starting angle of the sweep.

Linear

The color/transparency sequence transitions in a straight line across the element. The direction is controlled by Rotation and the position by Offset.

FieldValue
value0

Radial

The color/transparency sequence radiates outward from the element's center, optionally shifted by Offset. The radius is defined by the average of the element's width and height divided by two, effectively (width+height)/4. Rotation has no effect on a radial gradient.

FieldValue
value1

Conical

The color/transparency sequence sweeps clockwise around the center of the element, optionally shifted by Offset. Rotation controls the starting angle of the sweep.

FieldValue
value2