It's not about serverside or clientside. Stuff like "colors[0]" is not working for dynamic variable names:
http://wiki.graal.net/index.php/Crea...ring_variables
I am sure there is some way around that though, just requires a little bit more scripting.