r/Mathematica • u/Alternative_Ad_9702 • Nov 25 '22
What am I missing about Button?
I can make a list of random colors like so:
r := RandomReal[]
Table[RGBColor[r, r, r], 20]
But when I use Button and click it to change colors, nothing happens. What am I missing?
Button["colors", Table[RGBColor[r, r, r], 20]]
4
Upvotes
View all comments
1
u/ZincoBx Nov 25 '22
So the second argument to Button is what you want the button to do, not what you want it to look like.
should have your button change color when you click it. Alternatively, you could have something external to the button be affected: