Trying to parametrically change a materials RGB value

Hi All, I am trying to set up a script with which you can alter the color (graphics:shading) of a material using a number slider. This is what I have so far:

It seems that Color is not an immediately accessible parameter though, I did try writing a script to unwrap the element:
but I am not particularly skilled with Python so could not get it to work. Any help would be much appreciated.Set Materials.dyn (10.8 KB)

There’s a node in Clockwork that converts Dynamo colours to Revit colours, I think. Maybe that helps.