---
title: "UIGradient"
description: "Applies a two-endpoint colour and transparency gradient to its parent GUI object."
canonical: "https://docs.glorpia.com/instances/uigradient"
markdown: "https://docs.glorpia.com/instances/uigradient.md"
---
# UIGradient

Applies a two-endpoint colour and transparency gradient to its parent GUI object.

**Category:** Instances

## Properties

| Name | Type | Description |
| --- | --- | --- |
| `Colour` | ColourSequence | Two endpoint colours. Color is an alias. Default: white to white. |
| `Transparency` | NumberSequence | Two endpoint transparencies from 0 through 1. Default: 0 to 0. |
| `Offset` | Vector2 | Moves the gradient across the parent GUI. Each component is clamped from -1 through 1. Default: Vector2.zero. |
| `Rotation` | number | Gradient rotation in degrees. Default: 0. |
| `Enabled` | boolean | Controls whether the gradient is applied. Default: true. |

> **Note:** This UIGradient pass supports two endpoints. `ColorSequence.new` / `ColourSequence.new` and `NumberSequence.new` expose Start and End values rather than arbitrary keypoints.

> **Note:** UIGradient affects the parent GUI object's background, border and text rendering.

## Example

```luau
local gradient = Instance.new("UIGradient")
gradient.Colour = ColourSequence.new(
    Colour3.fromRGB(88, 255, 106),
    Colour3.fromRGB(80, 145, 255)
)
gradient.Transparency = NumberSequence.new(0, 0.2)
gradient.Offset = Vector2.new(0, 0)
gradient.Rotation = 35
gradient.Enabled = true
gradient.Parent = workspace.Part.BillboardGui.TextButton
```

## Related

- [Frame](https://docs.glorpia.com/instances/frame.md) — Rectangular GUI object.
- [TextLabel](https://docs.glorpia.com/instances/textlabel.md) — Text GUI object.
- [TextButton](https://docs.glorpia.com/instances/textbutton.md) — Clickable text GUI object.
- [Datatypes](https://docs.glorpia.com/scripting/datatypes.md) — ColourSequence, NumberSequence and Vector2.
