Color Table shortcut?

I’m not exactly a new user anymore but this old, seemingly minor issue is bugging me.

local object = display.newRect(0,0,16,16) object:setFillColor(255,255,255)

Ideally I should be able to build a table to handle this RGB nonsense:

[code]local colors = {}
colors[“white”] = { 255, 255, 255 }

object:setFillColor(colors[“white”])[/code]

I thought that would work, but Corona just sets it to black (0,0,0) unless I parse out each of the three values (colors[“white”][1], etc.), which ruins the entire idea.

Is there a way to pull off what I originally thought? [import]uid: 41884 topic_id: 22645 reply_id: 322645[/import]

Try this :

[code]
local colors = {}
colors[“white”] = { 255, 255, 255 }

object:setFillColor(unpack(colors[“white”])) [import]uid: 84637 topic_id: 22645 reply_id: 90300[/import]