Hi,
Color is hexadecimal, how to use RGBA format for color?
Let me know, thanks!
Jesse
Hi,
Color is hexadecimal, how to use RGBA format for color?
Let me know, thanks!
Jesse
For color where?
Hi,
look at below source code:
https://bitbucket.org/jesseleepalser/phaser-engine/src/d1a09aee36d0d6087f7bb6d72a8b52ee3a8acf9f/coreLogic.js#lines-150
I would prefer RGBA for color.
Jesse
const red = new Phaser.Display.Color(255, 0, 0);
player.setTint(red.color);
There is no tint alpha, but white 0xffffff
is like a transparent tint.
Hi,
How would I do varying degrees of alpha on an image?
(like in range 0 - 255)
Let me know, thanks!
Jesse
It’s not really alpha, but tints closer to white are weaker. So (255, 0, 0)
is full red and (255, 127, 127)
is less red.
Sorry, I mean how to do transparency?
player.setAlpha(127 / 255)
Ok, thanks!