Random Background Colour

for my Quiz App, i want to have the Buttons have a random Background colour.
E.g. that the first answer has a red Background and the second one has a blue one and so on. The Answerbuttons are repeated from Database (although i don’t know how to set up at this time. :laughing:

Any ideas on this?

In this I’d recommend putting the different colors in a list like:

["red", "green", "blue"]

and then use SHUFFLE to randomize the order :slight_smile:


This does not work. Only Errors. But i think it couldn’t work, because shuffle only randomises a list of objects. But you can only insert one object (colour) to the Background colour field.

if you add [0] to the end of your SHUFFLE function, it will pick the first (randomised) colour in your new randomised list:

SHUFFLE(["red", "green", "blue"])[0]

1 Like