# Changing fill paint from properties in a template

**URL:** <https://forum.inductiveautomation.com/t/changing-fill-paint-from-properties-in-a-template/11486>\
**Category:** Ignition\
**Created:** [April 9, 2016, 3:42pm UTC](https://forum.inductiveautomation.com/t/changing-fill-paint-from-properties-in-a-template/11486 "2016-04-09T15:42:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neergh](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@neergh](https://forum.inductiveautomation.com/u/neergh)\
**Post date:** [April 9, 2016, 3:42pm UTC](https://forum.inductiveautomation.com/t/changing-fill-paint-from-properties-in-a-template/11486/1 "2016-04-09T15:42:35Z")

</div>

Hi,

I’m new to this forum and IA.

Been designing a template and the template works correctly except for one animation I can’t get right.

I have 3 rectangles, No 1 and 2 are connected to UDT and change color (RED or GREEN) depending on the value in the PLC correctly. I need the 3rd rectangle to be RED unless either of the other 2 rectangles are GREEN.

All my attempts at the script in the 3rd rectangles’ fill paint property does not work.

if({Breaker Vert Large.rect\_top.fillPaint}||{Breaker Vert Large.rect\_bottom.fillPaint}=(“00FF00”),  
toColor("#FF0000"),  
toColor("#00FF00"))

There might be another way of achieving my goal. Any help much appreciated.

Harry

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 9, 2016, 8:25pm UTC](https://forum.inductiveautomation.com/t/changing-fill-paint-from-properties-in-a-template/11486/2 "2016-04-09T20:25:54Z")

</div>

`
if(toColor({Root Container.Rectangle.fillPaint})=toColor("00FF00")||toColor({Root Container.Rectangle 1.fillPaint})=toColor("00FF00"),toColor("00FF00"),toColor("FF0000"))`
