Tint

I’d love to be able to tint display objects.
Tinting, like in http://en.wikipedia.org/wiki/Tint

I would be able to reuse graphics more often when I just need a slightly darker or lighter image. [import]uid: 70635 topic_id: 11509 reply_id: 311509[/import]

oh. it’s on the roadmap already. never mind :wink: [import]uid: 70635 topic_id: 11509 reply_id: 41732[/import]

You might be able to achieve the desired effect with an additive blend.
http://blog.anscamobile.com/2011/04/compositing-fun-with-additive-blends/

The sky colour change in my game “Fruit Snatch” (not Corona) was done this way:
http://itunes.apple.com/us/app/fruit-snatch/id419639723?mt=8
[import]uid: 29093 topic_id: 11509 reply_id: 41744[/import]

Any news on tinting, i am trying to use a standard shape and give it lots of colours, without lots of different graphics… any ideas?

thanks

jez

Why not have a standard white or greyscale shape.

Then you can use:

object:setFillColor( r,g,b ) to make it any color you want.

or for example say you want to make an image brighter and darker.

Load your initial image and do object.setFillColor(196) to slightly darken it straight away.

You could then make it darker by doing object.setFillColor(128)

and to make it lighter do object.setFillColor(255)

I use this method for coloring my lasers which use a white png file as seen below.

[sharedmedia=core:attachments:149]

That worked really well, Thanks!!!

Any news on tinting, i am trying to use a standard shape and give it lots of colours, without lots of different graphics… any ideas?

thanks

jez

Why not have a standard white or greyscale shape.

Then you can use:

object:setFillColor( r,g,b ) to make it any color you want.

or for example say you want to make an image brighter and darker.

Load your initial image and do object.setFillColor(196) to slightly darken it straight away.

You could then make it darker by doing object.setFillColor(128)

and to make it lighter do object.setFillColor(255)

I use this method for coloring my lasers which use a white png file as seen below.

[sharedmedia=core:attachments:149]

That worked really well, Thanks!!!