# How to change the background color of button

**URL:** <https://discourse.nodered.org/t/how-to-change-the-background-color-of-button/13784>\
**Category:** Dashboard\
**Created:** [29 July 2019 08:30 UTC](https://discourse.nodered.org/t/how-to-change-the-background-color-of-button/13784 "2019-07-29T08:30:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klie](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@Klie](https://discourse.nodered.org/u/Klie)\
**Post date:** [29 July 2019 08:30 UTC](https://discourse.nodered.org/t/how-to-change-the-background-color-of-button/13784/1 "2019-07-29T08:30:57Z")

</div>

Hi everyone, I have a question.

I want to change the background color of the button. For example: When the button is clicked the background color change in white and when I clicked again on it, the background color return in the original color.

But I want this situation for more than one button not for only one.

I've read several topics, but nobody works for me.

---

<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:** [29 July 2019 08:35 UTC](https://discourse.nodered.org/t/how-to-change-the-background-color-of-button/13784/2 "2019-07-29T08:35:38Z")

</div>

does this not work ? [Examples of Colour change button and switch](https://discourse.nodered.org/t/examples-of-colour-change-button-and-switch/3650)

---

<div class="post-metadata">

**Author:** ![Klie](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@Klie](https://discourse.nodered.org/u/Klie)\
**Post date:** [29 July 2019 08:53 UTC](https://discourse.nodered.org/t/how-to-change-the-background-color-of-button/13784/3 "2019-07-29T08:53:59Z")

</div>

It works for only one button because if I add a new one, this flow changes both of them.

---

<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:** [29 July 2019 09:27 UTC](https://discourse.nodered.org/t/how-to-change-the-background-color-of-button/13784/4 "2019-07-29T09:27:12Z")

</div>

can you provide your flow where both buttons change when you press one
