# Change color of item data in table collection

**URL:** <https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805>\
**Category:** Ask for Help\
**Created:** [March 28, 2023, 6:32pm UTC](https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805 "2023-03-28T18:32:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![s1mple](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@s1mple](https://community.glideapps.com/u/s1mple)\
**Post date:** [March 28, 2023, 6:32pm UTC](https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805/1 "2023-03-28T18:32:57Z")

</div>

How can I change the color of the item data depending on the value in the table collection?

Example: if the value is danger, color should be red or if warning, yellow etc.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 29, 2023, 12:55am UTC](https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805/2 "2023-03-29T00:55:27Z")

</div>

If you mean the background color of each item, then I don’t believe we have a way to do that.

But if you don’t have any “images” already for the table, you can:

- Create an if-then-else column, something like if “value” is “danger”, then red, if “value” is “warning” then yellow, etc.

- Create an “Image from color” column and use the if-then-else column’s value as input.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/2/226af376ee4dba541ac24228d75328246dc7261e.png)

- Use the “image from color” result as your collection image.

---

<div class="post-metadata">

**Author:** ![s1mple](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@s1mple](https://community.glideapps.com/u/s1mple)\
**Post date:** [March 29, 2023, 7:20pm UTC](https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805/3 "2023-03-29T19:20:27Z")

</div>

Thanks for the suggestion. I guess what I’m trying to do is a lot more complex which is not possible in collection components. I have priority values like low, medim, high and I was looking for a way to style them with different colors in the description item. I want to show the text like is some sort of a badge.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 30, 2023, 12:51am UTC](https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805/4 "2023-03-30T00:51:40Z")

</div>

I do something like this with a custom collection and some HTML in a rich text component. I wanted something similar to a hint component, but with a little more control over text color and size. The color of the top bar changes based on status.

 ![Screenshot_20230329-194541](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/618a0957b68bbd67f311bee949c158adfbf5c224.png)

So if you are willing to use a custom collection, there’s a lot of different things you can do. Especially if you use a little bit of HTML or Inline CSS in that HTML.

---

<div class="post-metadata">

**Author:** ![s1mple](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@s1mple](https://community.glideapps.com/u/s1mple)\
**Post date:** [March 30, 2023, 5:38am UTC](https://community.glideapps.com/t/change-color-of-item-data-in-table-collection/59805/5 "2023-03-30T05:38:56Z")

</div>

I believe custom collections does not allow filter next to the search and grouping.

Edit: Filter is supported.
