You need reference to object. Use choosenColors[1].s as first argument for transition e.g.
transition.to(choosenColors[1].s,{time=vanishTime, alpha=0.01, xScale = 0.1, yScale = 0.1})
Note:
- You omitted local key word in definition of newDelay function so you make it global.
- Consider make s variable local.
Read more :
- transition.to
- Global or local variables?
- Corona SDK - Episode 6 - iPhone 5, Tab Bars, and Global vs Local Lua Variables - Corona SDK (youtube video)
Good luck:)