Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to change 1 color RGB?

Author
Message
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th May 2012 20:24
Any of you had ever changed 1 only color in a sprite?
Example :

Change all 255,0,255 in 0,255,255....
There is a way to do this?


iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th May 2012 20:30
Yes, many times.

If you start with a white/grey image file, you can make it just about any color you want using RGB.

This is the command:



Cheers,
Ancient Lady
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 25th May 2012 22:28 Edited at: 25th May 2012 22:32
You can also use any or all of these...



for instance, the first time a player starts my current game, the "How to Play" button cycles from Alpha 255 to Alpha 100 and back up again, until the player has vi

Something like this..

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 26th May 2012 04:11 Edited at: 26th May 2012 04:13
Yes i use this in my games, but imagine we have a sprite that have 3 colors as template...
- Yellow
- Purple
- Green

255,255,0
255,0,255
0,255,0

Now i wanna change only the green to red.
So ...
which method is the best to do it without changing yellow and purple??
Is there a way to take Bit per Bit the PNG data? Or i need to develope a new internal function in c++ to manipulate the PNG file?

iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic

Login to post a reply

Server time is: 2024-04-28 11:18:40
Your offset time is: 2024-04-28 11:18:40