# Condition - Button Pressed Change Background Color (not flash)

**URL:** <https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350>\
**Category:** Need help\
**Created:** [September 25, 2016, 8:59pm UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350 "2016-09-25T20:59:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwvemma](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bwvemma](https://forum.bubble.io/u/bwvemma)\
**Post date:** [September 25, 2016, 8:59pm UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/1 "2016-09-25T20:59:50Z")

</div>

Hi Everyone,

I wanting to change the background color of a Button when it is Pressed/Focused and hold that color until another button is pressed within the app (not just flash) but when I set up the “Pressed” option in the Conditional window it only flashes the color change and reverts back to the original color similar to how the “Hover” condition works. Not sure if I am missing something but any advice would be greatly appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [September 25, 2016, 9:15pm UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/2 "2016-09-25T21:15:35Z")

</div>

I think this will be best with custom states on the button. Do a quick search for custom states, lots of threads go into detail there

---

<div class="post-metadata">

**Author:** ![bwvemma](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bwvemma](https://forum.bubble.io/u/bwvemma)\
**Post date:** [September 25, 2016, 9:18pm UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/3 "2016-09-25T21:18:02Z")

</div>

Thanks @potentialthings, just found the solution in a different thread…

---

<div class="post-metadata">

**Author:** ![mignownow](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mignownow/32/16228_2.png) [@mignownow](https://forum.bubble.io/u/mignownow)\
**Post date:** [September 22, 2017, 12:43am UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/4 "2017-09-22T00:43:43Z")

</div>

@bwvemma can you share the solution? Thank you

---

<div class="post-metadata">

**Author:** ![bwvemma](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bwvemma](https://forum.bubble.io/u/bwvemma)\
**Post date:** [September 22, 2017, 1:31am UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/5 "2017-09-22T01:31:28Z")

</div>

Hi @mignownow,

You can achieve this by setting different “states” on an element (button) so that when the button is clicked a workflow is triggered and changes the state of the buttont. You also need to create a condition within the button’s editor so that when the state is changed to “xyz” the properties for that button will change. If you are not familiar with “states” just search around the forum as there are plenty of threads explaining states in great detail.

---

<div class="post-metadata">

**Author:** ![mignownow](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mignownow/32/16228_2.png) [@mignownow](https://forum.bubble.io/u/mignownow)\
**Post date:** [September 22, 2017, 1:49am UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/6 "2017-09-22T01:49:25Z")

</div>

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![sonic\_alh9](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sonic\_alh9](https://forum.bubble.io/u/sonic_alh9)\
**Post date:** [February 17, 2022, 4:21pm UTC](https://forum.bubble.io/t/condition-button-pressed-change-background-color-not-flash/6350/7 "2022-02-17T16:21:19Z")

</div>

do the buttons have to be in a repeated group (can someone illustrate how they done it)?
