# Is it possible to change text colors mid text

**URL:** https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712
**Category:** Questions about Thunkable X
**Tags:** button, label, text
**Created:** [August 18, 2021, 7:46pm UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712 "2021-08-18T19:46:03Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)
#### Post date: [August 18, 2021, 7:46pm UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/1 "2021-08-18T19:46:03Z")

</div>

I’m trying something like this but it’s not generating the result I’m wanting.  
(I knew this wouldn’t do it, I’m just trying to illustrate what I want to accomplish)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d47b9c931aa98ef26cab3ad3eacdf2386281648f.png)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [August 18, 2021, 8:37pm UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/2 "2021-08-18T20:37:54Z")

</div>

It is easily done in the StP (Snap to Place) UI.

- Open a screen.
- Add a row to the screen
- Set horizontal alignment of the row to “Left”
- Add two labels with different colors
- In the Screen.Opens block, write what you want in the two labels.

You get something like this’  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a6f06de9db7049592e3f6983f703d481e913f53d.png)

---

<div class="post-metadata">

### Author: ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)
#### Post date: [August 18, 2021, 8:46pm UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/3 "2021-08-18T20:46:15Z")

</div>

Ya I thought about using 2 labels, but that causes me to have to create more blocks and all, I wanted a way without having to use a 2nd label, thanks though.

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [August 18, 2021, 9:56pm UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/4 "2021-08-18T21:56:16Z")

</div>

How many words will you need to display?

(Or…what’s the maximum number of words you’ll need to display?)

---

<div class="post-metadata">

### Author: ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)
#### Post date: [August 19, 2021, 1:30am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/5 "2021-08-19T01:30:56Z")

</div>

It could change from time to time, ideally there wouldn’t be a limit.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [August 19, 2021, 1:35am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/6 "2021-08-19T01:35:55Z")

</div>

You really need to provide more details. There are ways to do this with clone blocks, for example, but so much depends on how many colors you need at one time and how those colors are being chosen (by the user, by you, are they always the same or variable colors, etc.).

---

<div class="post-metadata">

### Author: ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)
#### Post date: [August 19, 2021, 1:43am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/7 "2021-08-19T01:43:20Z")

</div>

Ok for simplicity let’s say I just want to highlight some text, we’ll say just 1 word in the middle of a sentence.

For example I want to emphasize the letter x in a math problem like 4 x 4

I want to make the x red and the 4s black

Let’s start with this, is this a simple task without creating additional blocks, can it just be done in line

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [August 19, 2021, 2:15am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/8 "2021-08-19T02:15:49Z")

</div>

When you simplify your question, you’re going to get simple answers. That’s just the way it works around here. So yes, you can easily set up something where the operator (“x”) is a different color from the factors.

You would just have three labels, one for each “4” and one for the “x”. And then you would use the label block for each component to set the colors as needed.

You also didn’t say whether the user is generating the text or you’re providing it. It’s much easier if you’re providing it.

---

<div class="post-metadata">

### Author: ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)
#### Post date: [August 19, 2021, 2:28am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/9 "2021-08-19T02:28:26Z")

</div>

But I asked if it can be done in the same label. Just 1 label.  
Yes the app would automatically do it, not the user.

So no it cannot be done in 1 label?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [August 19, 2021, 3:14am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/10 "2021-08-19T03:14:23Z")

</div>

No. And why do you need just 1 label? I realize it’s easier to code that way but if there’s another way – which there is – then it seems like you have an option that will work.

---

<div class="post-metadata">

### Author: ![overshield](https://avatars.discourse-cdn.com/v4/letter/o/e19b73/32.png) [@overshield](https://community.thunkable.com/u/overshield)
#### Post date: [August 19, 2021, 3:19am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/11 "2021-08-19T03:19:59Z")

</div>

Adding additional labels adds the headache of reformatting to make sure everything lines up, then when I want to adjust something like make a label visible or not visible I have to add additional blocks in order to do so.

Like you described above I have to create 3 labels, which means I have to adjust each one and add blocks for each one.

I understand functions would help reduce these additional steps as well as putting those labels into a single row and just hide the row, but it’s not always that simple with complex apps.

I just wanted to save some repetitive steps and make things simpler.

No worries, thanks for the help everyone.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [August 19, 2021, 4:36am UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/12 "2021-08-19T04:36:38Z")

</div>

I can understand wanting to be able to do that. It would be much simpler!

My idea is to use clone blocks to create the labels and then dynamically refer to them as needed. So it wouldn’t take very many blocks to do that but it’s complicated to set up the first time.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/is-it-possible-to-change-text-colors-mid-text/1456712/13 "2024-11-08T13:17:17Z")

</div>


