# Color change on a label

**URL:** <https://forum.inductiveautomation.com/t/color-change-on-a-label/79165>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [September 14, 2023, 3:28pm UTC](https://forum.inductiveautomation.com/t/color-change-on-a-label/79165 "2023-09-14T15:28:53Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 1, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/color-change-on-a-label/79165/31 "2024-07-01T14:09:25Z")

</div>

Ah here is another link from somone using my example and going into more details. He is using dates to create a "priority" color

This should be good enough:p  
Get a markdown component to paste in the "js" code in the srouce through a binding, dont forget to turn off the espaceHtml.

> [@Change color for each option based on some category for Perspective Dropdown Component](https://forum.inductiveautomation.com/t/change-color-for-each-option-based-on-some-category-for-perspective-dropdown-component/37952/6):
>
> I finally figured out how to do it. I used the method shared here: In their solution, they were able to set a specific style for each drop down option, adding a checkmark image to certain options. I just modified it to add on to the "styles" variable for each option, and set a background-color rather than adding content. [image] I'm using a list of options that I get from my database (it changes all the time). I loop through these options and check a time variable for the…

---

_[View the full topic](https://forum.inductiveautomation.com/t/color-change-on-a-label/79165)._
