when i press button object set random color

How to make it so that when you press a button, the object (cube) changes to a random color?

First, you have to create a material with a color parameter.


Then apply this material to your cube.
Next, do this:


Alternatively, if you want to limit your color range somehow, you can do something like this:


Note that you have to enter the parameter name manually.