Blocks suggestion for random colour change app

Hi all,I am new to thunable.Thank you in advance for the ideas and suggestions.

I am trying to make an app that changes background colour (e.g. red geen blue Only) but randomly at each second when clicked start.

I am struggling to find ways to build the blocks for this colour change.
All suggestions, solutions and ideas welcomed. Orz

1 Like

You can use an image for this (a solid color jpg for example) or your can change the background color of a component. I recommend changing the background.

See the documentation about color, including several ways to set the background color.

For the random part, you can either make a list of colors and the choose a random item or you can choose a random number (see the Math drawer) and use an if/elseif/else blocks to set the color.

If you get stuck, post a screenshot of the blocks you’ve tried and someone can help you further.


These blocks will make the trick


To compliment @muneer’s post, you can assign any element any CSS text color! This demo gives all 134. It also highlights the various color formats accepted!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.