Allow per character colouring in text

This could be done in multiple ways, from how minecraft does it with special characters to adding extra strings to the properties of TextLabels / etc

This would make working with guis so much easier, heck, even the default roblox chat could use it!

22 Likes

We just need a complete overhaul on how text is rendered in ROBLOX. However a system that Minecraft has really isn’t that hard to do in a ROBLOX game, and is pretty specific to the game.

Maybe some sort of way to set certain bounds of a Text objects text to a different color, font, etc would be a better solution.

2 Likes

I would argue for a new MarkupLabel object which has a string Contents property that would properly parse and display basic HTML/BBCode-like input.

Also, this should go into Client Features.

1 Like

A RTF-like format would probably be best; it’s simple to write, read and parse - unlike some variants of BBCode and HTML. For example:

This is some {\b bold} text.\par

I’m talking more from a developer viewpoint of course, because parsing RTF is actually quite easy. Parsing HTML, XML or BBCode on the other hand requires a little more work. If you’re working on something for user interaction, then you should decide how to do it yourself and implement it that way.

2 Likes

Bump, this is desperately needed, it makes creating guis miserable because I have to have a script just to make sure two pieces of text line up correctly

1 Like

Bumping because this is still relevant

2 Likes

Apologies for necrobumping this topic, but it’s something I’ve been wanting in Roblox for a while now! :slight_smile:

I think a great way to implement this would be to add in new string API.

local str = string.color('255,0,0','TheRings')
local str2 = string.color('255,255,255','0fSaturn')

Or perhaps it could be implemented into a string.modify system? Not entirely sure.

But I would love to see this implemented so I can stop making two text labels just to have a player’s name be a different color than the rest of the string.

4 Likes

Feature requested merged here

It is currently impossible to use colour codes, similar to Minecraft, or markdown, or a version of CSS in text. Can this please be added?

This has been requested for years (2015 and before) to no avail (I would bump the posts, but I don’t have access)

Use cases

Make GUIs look nicer.
Which looks better?
Player has joined the game. or

On top of this, pretty much every platform has support to this.

And finally, yes, you can do this with GetTextSize, but it’s significantly harder to do this with multi-line text and would just be easier to have it built-in natively.

Pretty much all the core scripts (or at least Chat) utilise this via hacky methods, so why is it not just built-in?

Specifics

A sort of custom MarkdownLabel where you can use things like BBCode, Markdown, etc. to add colours, change fonts (e.g. SourceSans → SourceSansBold, or have a font just for referring to player names), font sizes, etc. basically, any attribute that can be edited in a text label.

7 Likes