New material's colour is a variable in a construction script. I cannot properly initialize it.

Perhaps the problem is with the material itself. Can you show us?