# Change needle color in gauge

**URL:** <https://discourse.nodered.org/t/change-needle-color-in-gauge/61743>\
**Category:** Dashboard\
**Created:** [25 April 2022 08:09 UTC](https://discourse.nodered.org/t/change-needle-color-in-gauge/61743 "2022-04-25T08:09:44Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Kundepuu](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@Kundepuu](https://discourse.nodered.org/u/Kundepuu)\
**Post date:** [25 April 2022 08:09 UTC](https://discourse.nodered.org/t/change-needle-color-in-gauge/61743/1 "2022-04-25T08:09:44Z")

</div>

I use hotNip`s gauge and I need to change the color of the needle and the value text according to the value of gauge.

```auto
if (v< 50) {
  //change needle and text color to #FFFF99
} else if (time < 80) {
   //change needle and text color to #0000FF
} else {
   //change needle and text color to #EC173A
}

```

[flows (4).json](https://discourse.nodered.org/uploads/short-url/9JvJqfyEBE2i5Sul8RDHsnDpUKX.json) (22.5 KB)

---

_[View the full topic](https://discourse.nodered.org/t/change-needle-color-in-gauge/61743)._
