I have a system in place that allows me to have custom fonts and to move or recolor each piece individually since it recreates the text of a TextLabel into a frame full of ImageLabels for each letter. (Which it pulls from a sprite sheet)
So think of it this way I’m basically coding roblox’s rich text formatting system from scratch (specifically for color), where I have an ImageLabel for each letter and I want to recolor the letters based on a string of rich formatted text that I copied from a TextLabel.
So here’s an example string:
Here’s what the setup looks like in studio
and here’s what that looks like displayed in-game (it also has a wavy effect by tweening each letter)
Now I want to recolor these letters to match that rich formatted text example above. How would I go about that?
I tried splitting the string but it never worked quite properly. I need a way to get JUST the RGB values, a way to get just the words EFFECTED by the RGB values, and to also find the start and end positions of the (characters/graphemes) of the words that will be recolored, a start and end position basically, and then what I would do is loop through that start and end position with a for loop and find the numbered frames with matching names and change the ImageColor of the ImageLabels inside those frames. I just can’t find an efficient way to pull apart the formatted string to get data for what characters should be what color.