EZRichText – Simple, Powerful RichText Styling Module

EZRICHTEXT EXAMPLES

Hello!
I’ve created a module that makes working with RichText in Roblox simple and powerful.

Getting Started

Enable the RichText property on your TextLabel, TextBox, or TextButton.

Create a LocalScript and set its source to the following:

local EZRichText = require(path.to.EZRichText)
local EZRichTextObject = EZRichText.New("TEXT")

Escape forms (like <, >, &) are automatically handled safely.

Modifying Text

You can update the text at any time:

EZRichTextObject:ChangeText("NEW TEXT")
Adding Tags with Properties

Add tags like <font> or <stroke> with optional properties:

EZRichTextObject:Add("font", {color = "rgb(255,0,0)"}) -- The <br/> tag is also supported.

You don’t have to manually format RGB values:

-- Auto-converts to rgb(255, 0, 0)
EZRichTextObject:Add("font", {color = Color3.new(1, 0, 0)})

-- Supports BrickColor and Enum too
EZRichTextObject:Add("font", {color = BrickColor.Red()})
EZRichTextObject:Add("font", {face = Enum.Font.FredokaOne})
EZRichTextObject:Add("font", {weight = Enum.FontWeight.Heavy})
EZRichTextObject:Add("stroke", {joins = Enum.LineJoinMode.Miter})
Checking Tags and Properties

Check if a tag exists:

EZRichTextObject:HasTag("font") --> true/false

Check if a property exists in a tag:

EZRichTextObject:HasProperty("font", "color") --> true/false
Removing Tags and Properties

Remove entire tags:

EZRichTextObject:RemoveTags({"font", "stroke"})

Remove specific properties from a tag:

EZRichTextObject:RemoveProperties("font", {"color", "face"})
Getting the Final Text

Once your text and styles are ready, retrieve the full RichText string:

local Result = EZRichTextObject:Get()

You can now apply this to your TextLabel, TextBox, or TextButton.

Destroying
EZRichTextObject:Destroy()

Destroys and cleans the object.

Gradients

Predefined gradients:

  • Rainbow
  • RainbowOutline
  • Fire
  • FireOutline
  • Ghost
  • GhostOutline
  • Sunset
  • SunsetOutline

Gradient Example:

local Result = EZRichText.Gradient("TEXT", {"Rainbow", "RainbowOutline"}, false)
  • First argument: the text
  • Second: a table of gradient names
  • Third: whether the effect is dynamic (true or false)
Dynamic Gradients

You can animate text using RunService.Heartbeat like this:

local RunService = game:GetService("RunService")
local EZRichText = require(path.to.EZRichText)
local TextLabel = path.to.TextLabel

RunService.Heartbeat:Connect(function()
	TextLabel.Text = EZRichText.Gradient("TEXT", {"Rainbow"}, true)
end)

:warning: Dynamic gradients can be performance-intensive, especially with long text or multiple instances.

Configuration

You can customize default settings via the Configuration module:

MaxCharacters = 100, -- Caps length for performance
Speed = 1, -- Controls animation speed for dynamic gradients
OutlineThickness = 3 -- Outline thickness for gradients
Why It Exists

Manual RichText gets messy fast.
This module makes it clean, dynamic, and easy to manage tags and properties.

Also, read:

Would you use EZRichText?
  • Yes
  • No
0 voters
How’s EZRichText?
  • Excellent
  • Good
  • Decent
  • Needs Improvement
  • Not Useful
0 voters

Let me know your thoughts, feedback is always appreciated!

11 Likes

I haven’t checked the code yet but I like the module! It’s pretty good. I got a few questions tho! Is it modular? Can i make a custom gradient myself?

1 Like

Yes, it’s modular, you can add your own gradients.

1 Like