Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Character-based fill colors in text

I have a <text> element. I would like to give each character a unique color. In HTML and CSS, I might use a <span>. But I can't find anything similar with FitbitOS. Any recommendations?

 

For my use case, the text will be dynamic. I thought about using the text as a mask, but that is difficult to position color rectangles behind.

Best Answer
0 Votes
1 REPLY 1

I don't think there's an easy way. The path of least resistance may be to represent each character as a separate element. Use getBBox() (or whatever it is) to help with spacing.

Peter McLennan
Gondwana Software
Best Answer
0 Votes