# UI Button Colour from Global variable

**URL:** <https://discourse.nodered.org/t/ui-button-colour-from-global-variable/49538>\
**Category:** General\
**Created:** [9 August 2021 15:24 UTC](https://discourse.nodered.org/t/ui-button-colour-from-global-variable/49538 "2021-08-09T15:24:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MyRandomThoughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myrandomthoughts/32/41085_2.png) [@MyRandomThoughts](https://discourse.nodered.org/u/MyRandomThoughts)\
**Post date:** [9 August 2021 15:24 UTC](https://discourse.nodered.org/t/ui-button-colour-from-global-variable/49538/1 "2021-08-09T15:24:15Z")

</div>

I currently set a global variable with all the colours required for my buttons. I set this at startup and have a LinkIn node attached to the buttons with `{{colour.xxxx}}` as the text and background colours. This mostly works but sometimes they get "reset" to the default dashboard widget colour.

Is there any way of setting them directly to `{{global:color.xxxx}}`?

I do this so that I have a consistent colour scheme that can be quickly changed if required.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 October 2021 15:25 UTC](https://discourse.nodered.org/t/ui-button-colour-from-global-variable/49538/2 "2021-10-08T15:25:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
