# Change Gauge node colors

**URL:** https://discourse.nodered.org/t/change-gauge-node-colors/21722
**Category:** Dashboard
**Created:** [14 February 2020 20:22 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722 "2020-02-14T20:22:03Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [14 February 2020 20:22 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/1 "2020-02-14T20:22:03Z")

</div>

Is this the correct place to post some gauge wishes?

I am using it for scuba gas blending and would like to use some colors as indicators.  
In the normal gauge you can set gradients with sectors, but depending on the type of gas i am mixing the sectors are different. so i tried to set the sectors with {{msg.min}} and {{msg.max}} but unfortunately this is not working. Is it correct that it is not flexible or do i make a mistake here?

Next wish is the level gauge, i really love this one, looks like water, and water = scuba diving 🙂  
But i also would like to use colors in this one if possible...

And last wish wish wish... as cream on the cake... would like so much to put 2 different values in the in one level gauge with different colors... as my gasses are oxygen and helium together. but ok thats far away from the basic gauge... i understand.

Thanks!

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [14 February 2020 20:29 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/2 "2020-02-14T20:29:29Z")

</div>

How good is your HTML? 🙂

You could always try to track down an alternative gauge then use a Dashboard Template node to add it to your Dashboard.

---

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [14 February 2020 20:30 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/3 "2020-02-14T20:30:56Z")

</div>

ehhh bad.... i am always happy when my NR things work haha  
but i give it a try thanks!

---

<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: [14 February 2020 20:48 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/4 "2020-02-14T20:48:38Z")

</div>

If the time starts to grow as fruits on the trees, I will do all the still missing gauges. Meanwhile I can give advises how everyone who ever reached Node RED can do its own gauge. And then share it with community. It truely not that complicated at all

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [14 February 2020 21:32 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/5 "2020-02-14T21:32:22Z")

</div>

> [@RogierQ](#):
>
> Next wish is the level gauge, i really love this one, looks like water, and water = scuba diving 🙂  
> But i also would like to use colors in this one if possible...

You can use below flow as a reference for customizing the colors of the level gauge.

```auto
[{"id":"3f6adf81.8b1a6","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"f10db114.4357f","type":"ui_gauge","z":"3f6adf81.8b1a6","name":"","group":"d633ead2.d637c8","order":10,"width":6,"height":6,"gtype":"wave","title":"","label":"","format":"{{value}}","min":0,"max":"1200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":790,"y":220,"wires":[]},{"id":"4f4d2903.04f408","type":"inject","z":"3f6adf81.8b1a6","name":"Water Usage","topic":"Water Usage Today - Gallons","payload":"600","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"1","x":190,"y":220,"wires":[["ad333f84.f8fcc","ac85626.9c36ba"]]},{"id":"202d393d.bbcef6","type":"ui_template","z":"3f6adf81.8b1a6","group":"d633ead2.d637c8","name":"Water Usage Label","order":5,"width":6,"height":1,"format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":690,"y":140,"wires":[[]]},{"id":"ad333f84.f8fcc","type":"template","z":"3f6adf81.8b1a6","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<div class =\"chartlike\" > {{topic}} </div>","output":"str","x":500,"y":140,"wires":[["202d393d.bbcef6"]]},{"id":"f4e006f4.07adc8","type":"comment","z":"3f6adf81.8b1a6","name":"Water Usage","info":"","x":170,"y":140,"wires":[]},{"id":"ecfb236a.63727","type":"function","z":"3f6adf81.8b1a6","name":"Style Gauge","func":"msg.ui_control = \n\n{\n \"gtype\": \"wave\",\n\n \"options\":{\n \"circleColor\": msg.circleColor, \n \"textColor\": msg.textColor, \n \"waveTextColor\": msg.waveTextColor, \n \"waveColor\": msg.waveColor, \n \"circleThickness\":0.06, \n \"textVertPosition\":0.4, \n \"waveHeight\":0.08, \n \"waveCount\":3\n \n}\n}\n\n\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":220,"wires":[["f10db114.4357f"]]},{"id":"ac85626.9c36ba","type":"change","z":"3f6adf81.8b1a6","name":"Gauge Colors","rules":[{"t":"set","p":"circleColor","pt":"msg","to":"#255691","tot":"str"},{"t":"set","p":"textColor","pt":"msg","to":"#b2ddfb","tot":"str"},{"t":"set","p":"waveTextColor","pt":"msg","to":"#ff0000","tot":"str"},{"t":"set","p":"waveColor","pt":"msg","to":"#00ff00","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":220,"wires":[["ecfb236a.63727"]]},{"id":"1707d004.2840f","type":"change","z":"3f6adf81.8b1a6","name":"Gauge Colors","rules":[{"t":"set","p":"circleColor","pt":"msg","to":"#255691","tot":"str"},{"t":"set","p":"textColor","pt":"msg","to":"#b2ddfb","tot":"str"},{"t":"set","p":"waveTextColor","pt":"msg","to":"#b2ddfb","tot":"str"},{"t":"set","p":"waveColor","pt":"msg","to":"#3fa9f5","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":280,"wires":[[]]},{"id":"d633ead2.d637c8","type":"ui_group","z":"","name":"T1","tab":"d0cbb5d4.b94068","disp":false,"width":"6","collapse":false},{"id":"d0cbb5d4.b94068","type":"ui_tab","z":"","name":"Test","icon":"dashboard","order":9}]

```

![gauge-level](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43339d3b1c17c30045289da94ba542a69beddfd1.png)

---

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [15 February 2020 09:41 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/6 "2020-02-15T09:41:53Z")

</div>

Cool, thanks for making an example!

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [15 February 2020 09:45 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/7 "2020-02-15T09:45:21Z")

</div>

Not sure about diving in water that colour but ... 🙂

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [15 February 2020 12:57 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/8 "2020-02-15T12:57:52Z")

</div>

@Andrei Very nice! Now the test is can you show what happens if the number of gallons exceeds the upper limit. Something like this:  
 ![Screen Shot 2020-02-15 at 7.55.59 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/8/08e9ece1101e175823faf1697dac9b4049127e53.png)

🤣

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [15 February 2020 14:14 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/9 "2020-02-15T14:14:38Z")

</div>

🤣 😂 🤣

---

<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 March 2020 14:14 UTC](https://discourse.nodered.org/t/change-gauge-node-colors/21722/10 "2020-03-16T14:14:44Z")

</div>

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