climber

Change texture color

Recommended Posts

Total pixi noob here. 

I'm loading in a texture from an image file and need to dynamically change its color. The image is basically a flat wave-like shape that I want to be able to make different colors dynamically. I tried tinting a sprite but that only tints and doesn't make the color 100% opaque. 

What's the proper way to do this? Some sort of filter? I figure the answer to this is really simple, but I've poked around the API and am not seeing it. Thanks for any help!

Share this post


Link to post
Share on other sites

Yeah.  I don't know what the wave image is, but for mine, I use a white png image usually, and then set the tint to give it a color.  I get the tint off of gimp color picker, but have to set the first two digits to 0x and then the 16 digit numbers, like 0xFFFFFF.

Share this post


Link to post
Share on other sites

@fire7side you rock

@climber

There are a number of ways of changing colors of picture, different shader and blendmodes (not all of blendmodes are possible in webgl). If you want to do something, first post how exactly do you think that thing must convert single pixel, then find the name of that effect :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.