A simple tutorial on how to fade an object between two colors.

Article by Richard Davey. Posted on 28th Feb 2017.   @photonstorm

image

This is a new tutorial from Sprite Storm: "Ever wanted to get something to fade between two colours? Well lets look at how to do that in this post!

It's actually not as difficult to do, though because phaser doesn't allow us to do it out of the box, we need to just tweak a few things.

So to break it down, how do we cycle through colours? Well.. a hex value '0xf23da4' for example, is just a combination of red blue and green. We can take advantage of this by using phaser's colour interpreter."

Read More

Comments

comments powered by Disqus