# Change Color Based on 3 boolen Values

**URL:** <https://forum.inductiveautomation.com/t/change-color-based-on-3-boolen-values/37645>\
**Category:** Ignition\
**Created:** [August 12, 2020, 1:18pm UTC](https://forum.inductiveautomation.com/t/change-color-based-on-3-boolen-values/37645 "2020-08-12T13:18:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh.santee](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@josh.santee](https://forum.inductiveautomation.com/u/josh.santee)\
**Post date:** [August 12, 2020, 1:18pm UTC](https://forum.inductiveautomation.com/t/change-color-based-on-3-boolen-values/37645/1 "2020-08-12T13:18:42Z")

</div>

I am trying to use the basic conveyor but I have 4 to 5 states that i need to show them with each with a boolean value based on level of severity. Running / Energy Management / Full / E-Stop. I have tried to set up a if statement but it tells me i cant have nested ifs. Any help with this would be amazing thanks!

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [August 12, 2020, 1:23pm UTC](https://forum.inductiveautomation.com/t/change-color-based-on-3-boolen-values/37645/2 "2020-08-12T13:23:24Z")

</div>

I would look at using [binEnc()](https://docs.inductiveautomation.com/display/DOC80/binEnc) and a [case()](https://docs.inductiveautomation.com/display/DOC80/case). You can do the binEnc() as the value then set your case() to return the states you want based on the value returned from the binEnc().
