Transition to colors / RGB values

Is there a way via Corona API to transition to a RGB value…

ie. I create a rectangle, use :setFillColor… but then I want to do
transition.to(object, {red:250 …

Thanks,
Michael [import]uid: 123650 topic_id: 23603 reply_id: 323603[/import]

Hey there, not exactly - but try this code, might give you something to go on;

[lua]r, g, b = 40, 20, 20

local obj = display.newCircle( 160, 160, 60 )
obj:setFillColor(r, g, b)

local function changeColor ()
local function colorTrans()
if r < 255 then
r=r+1
print ®
obj:setFillColor(r, g, b)
else
timer.cancel(colorTimer)
end
end
colorTimer = timer.performWithDelay(1, colorTrans, 0)
end
changeColor()[/lua]

Peach :slight_smile: [import]uid: 52491 topic_id: 23603 reply_id: 94695[/import]