# Can I change the color on simple gauge based on a tag in Perspective

**URL:** <https://forum.inductiveautomation.com/t/can-i-change-the-color-on-simple-gauge-based-on-a-tag-in-perspective/38701>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [September 15, 2020, 5:47pm UTC](https://forum.inductiveautomation.com/t/can-i-change-the-color-on-simple-gauge-based-on-a-tag-in-perspective/38701 "2020-09-15T17:47:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [September 15, 2020, 5:47pm UTC](https://forum.inductiveautomation.com/t/can-i-change-the-color-on-simple-gauge-based-on-a-tag-in-perspective/38701/1 "2020-09-15T17:47:33Z")

</div>

I wanted the colors to be yellow, green or red depending on the pressure on a gauge bound to a tag. I’m fine scripting it, but not sure how to script to an event of the tag value changing. Thx, Jake

---

<div class="post-metadata">

**Author:** ![Ethan.Strike](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethan.strike/32/13809_2.png) [@Ethan.Strike](https://forum.inductiveautomation.com/u/Ethan.Strike)\
**Post date:** [September 15, 2020, 6:41pm UTC](https://forum.inductiveautomation.com/t/can-i-change-the-color-on-simple-gauge-based-on-a-tag-in-perspective/38701/2 "2020-09-15T18:41:01Z")

</div>

Jake,

You should be able to use a binding expression on the prop style classes to change the components to a style by looking at a tag binding

```auto
if({MyTag} = 1, "Red", "")

```

Where MyTag is the tag you’re looking for when it is 1, and “Red” is the name of a custom style with a color “red”

-Ethan S.

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [September 15, 2020, 6:45pm UTC](https://forum.inductiveautomation.com/t/can-i-change-the-color-on-simple-gauge-based-on-a-tag-in-perspective/38701/3 "2020-09-15T18:45:13Z")

</div>

perfect, thank you very much
