How to change marquee background color one by one automatically.

can you not see that some context is missing here?

in general,

for i = 1 to ncolors {
color(i) = newcolor(i)
}