Is it possible to use colors as text?

For an app of mine, I’m allowing the users to choose ‘pawns’, just differently coloured circle emojis. But some phones may not accept all the emojis, so I want to have 3 sliders for RGB, and then keep setting a label’s background color to the generated output. Can I use this background color like text?

set button1’s text to join (button1’s text + newline + generate rgb pawn)

I’m unable to find alternatives to the emojis I used.


1 Like

You can set background colors from text values but I don’t really understand this:

1 Like

By that, I mean I want to set a button’s text to
join- button 1’s text, then a newline block, and generate rib pawn is the name of the variable I’m going to set the slider-generated rgb value as.

Oh, okay, I wasn’t sure what generate rib pawn referred to but now I get it.

Assuming you can get the value from each slider, you should be able to join those values into a text string that specifies a color as shown in the link I posted above.

1 Like

But won’t the text string appear like a text string instead of a block of color?

Or does Thunkable recognize rgba(value, value,value,1) and convert it into color?

It will. I’m confused by your first post because you mention background color but then you say you’d like to set the button’s text. Did you mean the button’s background color?

I guess what would help here is for you to share an example of a correctly formatted output. What are you hoping to be able to display?

1 Like

It does if you assign that text string to something that expects a color such as a component’s text color or background color property.

That’s exactly what the documentation link I posted shows. Have you read over that?

1 Like

OK, i guess i wasn’t clear enough. What I want to do is assign a certain color as a block of color to a button’s text. I think you are familiar with the color picker method of using 3 sliders. I want to join a block of color along with text and display it as a button’s text. Long story short, I want to display color as text.

I think I understand. So you want the button’s text to be something like this:


That’s not possible. You would need two components to display the text and the color.

1 Like
I got this image from the web. You’ll notice that there’s a yellow pawn piece on the board. I want to allow the users to use sliders to generate their own color (like in the Aloha chat app). And I want to display that block of color along with some other text on a button.

Is there a reason you can’t use the slider values to set the button’s background color and then set the button’s text to whatever text string you want? The text would overlay the background color just like a normal button instead of having a newline to separate the text from the color, as you suggested.

1 Like

Oh, ok. That’s exactly what I wanted, but now I’ll have to find something else. I want to display the pawn pieces as text, so I allowed the user to pick from colorful circle emojis. :black_circle: :brown_circle: :green_circle: :large_blue_circle: :orange_circle: :purple_circle: :red_circle: :yellow_circle: When I Live Tested my app on the phone, I realized that most of the emojis weren’t supported. Now, I have to search for some other emojis that appear as text.

Oh, I’m making some of my cells with different background colors, as in they are color coded to show the users something. If I land on one of those color coded cells, then my color of my piece will hide the original color-code background. That’s a nice idea though.

I like your idea it’s interesting,it’s gives me some ideas for my apps. Hope you will implement it successfully.

1 Like

Thanks! I’m still using emojis, but hope to find a different way soon.