# How to change the default color of ui\_gauge

**URL:** <https://discourse.nodered.org/t/how-to-change-the-default-color-of-ui-gauge/57640>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [2 February 2022 12:40 UTC](https://discourse.nodered.org/t/how-to-change-the-default-color-of-ui-gauge/57640 "2022-02-02T12:40:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![radjunior](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/radjunior/32/45626_2.png) [@radjunior](https://discourse.nodered.org/u/radjunior)\
**Post date:** [2 February 2022 12:40 UTC](https://discourse.nodered.org/t/how-to-change-the-default-color-of-ui-gauge/57640/1 "2022-02-02T12:40:38Z")

</div>

Hello everyone, I would like to know if it is possible for me to change the selected color in the image through a ui-control, or some other external css file

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/8682f62354061d05bf897a47cdd0c43f3f4a4fcf.png)

That way I can enter the max and min values dynamically, since it's not possible to change the internal settings, is it possible to change it through "ui\_control"?

```auto
var total = msg.payload.Total
var disponivel = msg.payload.Disponivel
var indisponivel = msg.payload.Indisponivel

msg = {ui_control:{min: 0, max:total}}, msg.payload = disponivel;
return msg;

```

---

<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:** [2 February 2022 12:53 UTC](https://discourse.nodered.org/t/how-to-change-the-default-color-of-ui-gauge/57640/2 "2022-02-02T12:53:25Z")

</div>

Many many options can be changed via `msg.ui_control`

> <https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md>

> <https://github.com/toorshia/justgage/blob/master/justgage.js#L59>

Flow:

```auto
[{"id":"8a9931c63ddf715b","type":"inject","z":"afcfe6f7a144f0b4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"2","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":230,"y":620,"wires":[["468db23d521c4844"]]},{"id":"468db23d521c4844","type":"random","z":"afcfe6f7a144f0b4","name":"","low":1,"high":10,"inte":"true","property":"payload","x":400,"y":620,"wires":[["de06e2704d7ddfe6"]]},{"id":"de06e2704d7ddfe6","type":"ui_gauge","z":"afcfe6f7a144f0b4","name":"","group":"d129285e4b08a665","order":2,"width":"3","height":"3","gtype":"donut","title":"gauge","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":570,"y":660,"wires":[]},{"id":"9ab1252e4c2a76e6","type":"inject","z":"afcfe6f7a144f0b4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":660,"wires":[["9d83cf7302235638"]]},{"id":"9d83cf7302235638","type":"change","z":"afcfe6f7a144f0b4","name":"gauge color","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"options\":{\"gaugeColor\":\"#ff00ff\"}}","tot":"json"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":660,"wires":[["de06e2704d7ddfe6"]]},{"id":"d129285e4b08a665","type":"ui_group","name":"Select Station","tab":"85850867b381145e","order":1,"disp":true,"width":"6","collapse":false},{"id":"85850867b381145e","type":"ui_tab","name":"Trains","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<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:** [16 February 2022 12:53 UTC](https://discourse.nodered.org/t/how-to-change-the-default-color-of-ui-gauge/57640/3 "2022-02-16T12:53:47Z")

</div>

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