# Fill Colour auf a Rectangle

**URL:** <https://discourse.nodered.org/t/fill-colour-auf-a-rectangle/11596>\
**Category:** Dashboard\
**Created:** [27 May 2019 11:43 UTC](https://discourse.nodered.org/t/fill-colour-auf-a-rectangle/11596 "2019-05-27T11:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mario](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@Mario](https://discourse.nodered.org/u/Mario)\
**Post date:** [27 May 2019 11:43 UTC](https://discourse.nodered.org/t/fill-colour-auf-a-rectangle/11596/1 "2019-05-27T11:43:25Z")

</div>

I'm looking for an example to change the fill color of a rectangle. For example, when changing a boolean from 0 to 1, the content of the rectangle should change from red to green. furthermore, the rectangle should be adaptable in size.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [27 May 2019 11:52 UTC](https://discourse.nodered.org/t/fill-colour-auf-a-rectangle/11596/2 "2019-05-27T11:52:05Z")

</div>

Found an example for you

> [@Created color box in dashboard](https://discourse.nodered.org/t/created-color-box-in-dashboard/10741):
>
> I want to choice box color in dashboard. \<div style="background-color: red; padding: 10px; margin: 0 auto; width:10px;"\> \</div\> This is my template. I want to change background-color red to green. When I got a data, I want to flexible to change red to green. I used switch, but two color box in my dashboard. Help me please.
