Color genrator’s random color apply to button background

So I’m trying to make a string where if you pressed a button it gives you a random color to paint on canvas, but I don’t know how to apply the random color given to have the button’s background reflect on it each time when randomized

Something like this ?

I read the code and I believe so, thank you so much!

So that the button text should be always readable, You can use the HSP (Highly Sensitive Poo - don't ask me) equation to test whether the random colour is light or dark, and set the button text colour accordingly:

This does a better job:

1 Like

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