# Color change

**URL:** <https://forum.inductiveautomation.com/t/color-change/12323>\
**Category:** Ignition\
**Created:** [November 2, 2016, 9:04pm UTC](https://forum.inductiveautomation.com/t/color-change/12323 "2016-11-02T21:04:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DGrossen](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@DGrossen](https://forum.inductiveautomation.com/u/DGrossen)\
**Post date:** [November 2, 2016, 9:04pm UTC](https://forum.inductiveautomation.com/t/color-change/12323/1 "2016-11-02T21:04:00Z")

</div>

I would like to automate the color change on a valve. Green when confirmed open, Red when closed and either blinking green or blinking red when failed in one or the other state. I have Boolean tags for confirmed open, closed and failed but cannot tie these into four different color states on a valve I pulled from Symbol Factory. I drilled into the Group\_Body/Path/Fill Paint and can tie one color to one condition. Is there a way with using the Fill Paint of the Body or do I have to use visibility and put four indicators on top of each other for every valve I have?

Thanks

---

<div class="post-metadata">

**Author:** ![DGrossen](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@DGrossen](https://forum.inductiveautomation.com/u/DGrossen)\
**Post date:** [November 2, 2016, 9:45pm UTC](https://forum.inductiveautomation.com/t/color-change/12323/2 "2016-11-02T21:45:07Z")

</div>

Along with this, I’m using the pipes and valves from Symbol Factory with nice gradient colors. Having to fill these in with solid colors makes the graphic look clunky at best. Even a PanelView gives the option of transparency so I can retain the gradient color when not using a color. If I want to color a pipe to indicate flow or content then the “zero” state has to be solid gray? I hope there is a way to accomplish this.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [November 2, 2016, 10:28pm UTC](https://forum.inductiveautomation.com/t/color-change/12323/3 "2016-11-02T22:28:53Z")

</div>

Create a custom property on the component called “myState”

Then bind it to the expression

```auto
if({Failed},1,if({Closed},2,3))
```

Then you can bind the fill color to whatever fill you want based on the value above.

---

<div class="post-metadata">

**Author:** ![DGrossen](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@DGrossen](https://forum.inductiveautomation.com/u/DGrossen)\
**Post date:** [November 3, 2016, 8:13pm UTC](https://forum.inductiveautomation.com/t/color-change/12323/4 "2016-11-03T20:13:03Z")

</div>

jpark, thanks for the info.

As for the pipes and the gradient colors, is there any way to retain that quality in the ‘zero’ state?
