How to insert color format into rich text string?

Just a small question, if you would have a variable with a color added to it then would it be possible to add it into a rich text format?

A code example of what i’m trying to achieve would be:

local Blue =, 0.6, 1)

Textlabel.Text = '<font color="'.. Blue ..'">Hello this is in blue'

If this is not possible then please do tell me as it would help a lot!

1 Like

I believe you have to use RGB or a Hex colour code for rich text to colour it.

local Blue = '"#0000FF"'

TextLabel.Text = '<font color=' .. Blue .. '>Hello this is in blue</font>'
1 Like

I could see how this could work, let me try it out in roblox studio and i’ll get back to you.

1 Like

It worked! Thank’s a lot for this, now i can continue what i was working on

1 Like

No problem, have a good day.


1 Like