I’m not sure if this is a Corona or Lua question. I would like to be able to have some standard colors I use through out my app. For example, a green for when good things happen and a red for when bad things happen.
Something like,
local GREEN = {r=34, g=224, b=27, a=200}
local RED = {r=209, g=29, b=41, a=150}
So, instead of writing
text:setTextColor(34, 224, 27, 200)
I’d much rather write something like
text:setTextColor(GREEN)
That way when a client comes back and says the green is hurting their eyes and they simply must have 2 more bits of blue, I can make the change in one spot instead of the 27 spots where that color appears and all is good.
Is there a simple way of doing this that I’m overlooking due to my overwhelming Lua Newbiosity?
Thanks. [import]uid: 161992 topic_id: 32301 reply_id: 332301[/import]
[import]uid: 52491 topic_id: 32301 reply_id: 128498[/import]