# Application wide background color for Vision windows

**URL:** <https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573>\
**Category:** Ignition\
**Tags:** ignition79, vision\
**Created:** [June 11, 2020, 10:12pm UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573 "2020-06-11T22:12:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 11, 2020, 10:12pm UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/1 "2020-06-11T22:12:00Z")

</div>

Can anyone think of how I can assign a default color for all the Vision windows of an application so that, for example, if we find it’s a bit bright or dark we can change it once and a background color binding on every window will use that color?

Many thanks.

---

<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:** [June 11, 2020, 11:00pm UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/2 "2020-06-11T23:00:35Z")

</div>

Make a string client tag to hold the color. Then bind the background property to it.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 11, 2020, 11:05pm UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/3 "2020-06-11T23:05:07Z")

</div>

I was thinking of that and now that you have confirmed it I’m wondering do I just initialise that in the startup script?

What type of tag and what format do I use? Hex? or 255, 255, 255 format?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 11, 2020, 11:13pm UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/4 "2020-06-11T23:13:00Z")

</div>

Use a string client tag (you can't use anything else).  
I use HEX, but really it doesn't matter, I guess whatever's more comfortable.  
FYI if you bi-directionally bind the client tag to a fillPaint property, re-assigning the colour by picking a new colour from the colour picker on the fillPaint will set it to the string `"color(r,g,b)"` (assuming you don't force the colour of the client tag using an expression - which you should definitely do to avoid this very situation and where someone forgets, e.g. me, that it's bound and accidentally changes the colour everywhere 😆)

> [@Transistor](#):
>
> do I just initialise that in the startup script?

"Initialise" it via an expression in the client tag, as above

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 12, 2020, 12:38am UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/5 "2020-06-12T00:38:59Z")

</div>

> [@nminchin](#):
>
> Use a string client tag (you can’t use anything else).

That's not quite true. You can use a single client dataset tag to hold all of your colors, with specific row indices documented to hold the color for specific purposes. The dataset can hold an actual java color object, so you don't suffer the parsing load everywhere. Using a dataset offers some conveniences if you want to store and reload complete color schemes to/from a database.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 12, 2020, 12:42am UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/6 "2020-06-12T00:42:26Z")

</div>

I thought about adding a \* to “can’t”, as there are always alternatives. Although I didn’t consider using a dataset which is interesting.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 12, 2020, 6:31am UTC](https://forum.inductiveautomation.com/t/application-wide-background-color-for-vision-windows/35573/7 "2020-06-12T06:31:33Z")

</div>

Super, thanks, guys.

@nminchin, thanks for the bi-directional binding tip. That solves the problem of another developer overwriting very nicely.
