# Need help changing text element color

**URL:** <https://forum.bubble.io/t/need-help-changing-text-element-color/369157>\
**Category:** Need help\
**Created:** [May 9, 2025, 10:41pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157 "2025-05-09T22:41:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottbassett](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scottbassett](https://forum.bubble.io/u/scottbassett)\
**Post date:** [May 9, 2025, 10:41pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/1 "2025-05-09T22:41:42Z")

</div>

Hi,  
I have a simple repeating group that shows county names and then a rating.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/2/b/2bace4c5b3e8e9b3c3edf4d0203ed420222877c1.png)

I want to change the font color of the county name when the rating is in a specific range. Example: if rating is \> 5.5 font color changes to green.

The rating is being calculated as below:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/d/b/db3f85144415d86c8e99885140766b007f60f0f5.png)

I assumed I could use a conditional on the county name that was, When Avg Rating is \> 5.5 change font color to Green but I don’t have those choices.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/c/bc0977fa2f2f5f6ad7d5d6ec61366c831f624d10.png)

I haven’t had any luck with custom states so any help is appreciated!

Thanks!

---

<div class="post-metadata">

**Author:** ![ramaarana7](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ramaarana7/32/250546_2.png) [@ramaarana7](https://forum.bubble.io/u/ramaarana7)\
**Post date:** [May 9, 2025, 11:17pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/2 "2025-05-09T23:17:01Z")

</div>

Here’s an odd solution:

Why don’t you try putting the scores inside an input element (disabled)?

So, instead of using a Text element to render the scores your render them inside an Input, which you disable of course.  
Then you set the initial value to the rating calculation and remove the borders so it looks just like a regular text element.

This way you’ll be able to access the input’s value (rate) and apply the desired logic.

---

<div class="post-metadata">

**Author:** ![scottbassett](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scottbassett](https://forum.bubble.io/u/scottbassett)\
**Post date:** [May 9, 2025, 11:27pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/3 "2025-05-09T23:27:21Z")

</div>

I gave it a try but the font color doesn’t change. Here is the RG

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/2/b221042333ebfa820f85b53b4429b3189993588b.png)

And the conditional to change the font color

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/f/8/f8972ce23ff69f2f13d3ea4674ca946d5ef728b1.png)

Thoughts?

---

<div class="post-metadata">

**Author:** ![ramaarana7](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ramaarana7/32/250546_2.png) [@ramaarana7](https://forum.bubble.io/u/ramaarana7)\
**Post date:** [May 9, 2025, 11:37pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/4 "2025-05-09T23:37:51Z")

</div>

Make sure you are placing the text in the ‘Inital value’ field of the input rather than the placeholder. !

---

<div class="post-metadata">

**Author:** ![scottbassett](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scottbassett](https://forum.bubble.io/u/scottbassett)\
**Post date:** [May 9, 2025, 11:41pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/5 "2025-05-09T23:41:03Z")

</div>

If I’m understanding right, it doesn’t like what I’m doing.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/7/a759fc01a6dcfc3cd703dc63edcd6da79764e3b0.png)

---

<div class="post-metadata">

**Author:** ![scottbassett](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scottbassett](https://forum.bubble.io/u/scottbassett)\
**Post date:** [May 9, 2025, 11:53pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/6 "2025-05-09T23:53:10Z")

</div>

When I do the calculation in the placeholder, the input returns the correct value but the conditional on the county text doesn’t work.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/2/c2096a94a460077ec24e13071e96e6e8d182b3c3.png)

---

<div class="post-metadata">

**Author:** ![ramaarana7](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ramaarana7/32/250546_2.png) [@ramaarana7](https://forum.bubble.io/u/ramaarana7)\
**Post date:** [May 9, 2025, 11:57pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/7 "2025-05-09T23:57:54Z")

</div>

What’s the error message display on the editor?

You probably have to change the content format.  
Bare in mind the content of the input will be empty if you place the rate on the placeholder…

You could put the input inside a Group with a content type ‘number’ and place the rate calc as the data source. Then pull the value from the parent group as the inital content.

---

<div class="post-metadata">

**Author:** ![scottbassett](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scottbassett](https://forum.bubble.io/u/scottbassett)\
**Post date:** [May 10, 2025, 12:10am UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/8 "2025-05-10T00:10:45Z")

</div>

some progress but not quite there. You’ve given me some things to work from so Thank You. I have to step away for the night but will work on it over the weekend.

---

<div class="post-metadata">

**Author:** ![scottbassett](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scottbassett](https://forum.bubble.io/u/scottbassett)\
**Post date:** [May 10, 2025, 12:16am UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/9 "2025-05-10T00:16:09Z")

</div>

So, I had to try one more thing before shutting down and it worked!

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![ramaarana7](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ramaarana7/32/250546_2.png) [@ramaarana7](https://forum.bubble.io/u/ramaarana7)\
**Post date:** [May 10, 2025, 10:38am UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/10 "2025-05-10T10:38:40Z")

</div>

Happy to help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [July 18, 2025, 10:42pm UTC](https://forum.bubble.io/t/need-help-changing-text-element-color/369157/11 "2025-07-18T22:42:12Z")

</div>

Closed on July 18, 2025, 10:42pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
