Color type

I’m wondering why there is no color type in Corona. It’s very verbose having to store r, g, and b values for every color you want to store. Having a Color type (like the OfColor in openFrameworks) would be really neat.

By the way, it is also very strange that the forum filters out the word “color” in searches so forgive me in advance if this has been discussed before.

Well you can’t have a colour type because you can’t create types. One useful improvement would be to change setFillColor() etc so that they could take a single parameter of the RGB form (e.g. an 6 digit/3 digit hex value) ; this could be picked up by the second and third parameters being nil. RGB is a pretty standard format.

Ah! That’s a good reason right there.

Honestly the more I work with Lua the more I miss other languages. 

Still, I would settle for being able to use a table as a parameter, or as you suggested an HEX string…

Well you can’t have a colour type because you can’t create types. One useful improvement would be to change setFillColor() etc so that they could take a single parameter of the RGB form (e.g. an 6 digit/3 digit hex value) ; this could be picked up by the second and third parameters being nil. RGB is a pretty standard format.

Ah! That’s a good reason right there.

Honestly the more I work with Lua the more I miss other languages. 

Still, I would settle for being able to use a table as a parameter, or as you suggested an HEX string…