(new to scriping) Button to change object color

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

What shader is this? Is this your own?

In any case the spelling and uppercase/lowercase of shader properties is critical.

Right-click edit on the material to edit the shader and see its properties.

For instance, the default standard shader has a _Color property, NOT a _color property.