Gamezero Draw Programmatically change colour rgb causes error

I am trying to control colour shade programmatically however when i try to create colorant string either by colorant’rgb((val),(val),$(val)‘) or
Colorant’rgb(‘string(val)’,‘string(val)’,‘string(val)’)’’
The draw method fails and doesnt read the rgb string correctly. Any help would be welcome

Instead of colorant, you can use RGB

eg

c = RGB(1,1,0)

then

draw(rect, c)