How to set Color in the button

Good Day!

Can anybody help me on how to set a color in the buttons in loading event?

My Code:

var colorful = new Color("_root.btn1");
colorful.setRGB(15329767);

bur I got an error like this.
Error Message: Statement must appear within on handler

my scenario is:

i have group of boxes then i change it to symbol buttons. and every buttons have a corresponding colors. and i want to color the buttons.

Your Help is greatly appreciated