Change background color

Hi, I’m very new with this wonderful software.
Could someone please show me how to change the backgroundcolor of the app by pressing an ordinary button ? I’ll guess it’s the same as if I wanna change buttoncolor when pressing the button.

I have looked in the tutorials but can’t find out how to do the above.

Best Regards

// Andreas

Hi Andreas, welcome to the community!

You can do this by binding the background color property of the page to a Color code type page variable via a formula:

Then use Set page variable after Component Tap to change the value:

1 Like

That worked like a charm, but let’s say I want to change color of the button ?
I know there is the trick with container and hiding/showing, but is there any easier way ?

Best Regards


Hi Andreas, that is actually super simple. Just use the Set component styles flow function from the marketplace.

You can change any CSS property of an element in Set component styles with {cssProperty: value} in the New Styles property. For example if you want to change the color of a button to blue you can do it with {backgroundColor: 'blue'} . You can find a list of CSS properties here, just remember to write them in camelCase so for example font-size in CSS is fontSize in Composer. :slight_smile: