Use button color as indicator

When I run this:
The first time after opening the app I have to long click twice to change the color to red, after that every long click changes the color. The grey color comes directly from the color selector.
When I run this:
The color changes after each long click.

It’s no big deal but a bit frustating

Hope it helps, great show…

What colour is the button when you start (without using the initialise block) ? If not grey then it will set it to grey…

Hello TIMAI2,

It starts with the standard color grey. I expect it is a tad different from the 204 204 204 from the color selsct box, but I can’t see the difference.

Yes, but is that “DEFAULT” or “Gray” ? - there is a difference in what might happen

Initialise the button to either your red colour or grey colour

it is the default, I asumed it was the same as the grey in the color selction box

There aren’t many greys to choose from

204 204 204 = CCCCCC = LightGray. Change the button color from the default to LightGray.

A color has 4 components, not 3.
That leaves lots of room for a comparison to fail.

I had a similar problem. I seem to have solved it by replacing “else” with “else if”.
Try it