Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Color a Picture

Tdata

Sponsor

I have a question.  Is there a way to 'Color' a grayscale image a certain color With RGSS/2?  I'm not talking Hue/Sat I'm talking Color... As in the tool... Where no matter the original color it is changed to the color.  I really would rather not have to have  files named: fighter_redh_barmor_bscrapetat.png  I'd rather just do something like this:
Code:
@scolor = SColor.new

player.base = fighter
player.hair_color = @scolor(255, 146, 5, hdefault.png)
player.armor_color = @scolor(220, 123, 243, adefault.png
ECT...

Can it be done?
 

poccil

Sponsor

You can try modifying the tone of the sprite that the image is in.  Here's an example.  Assume that "sprite" refers to a sprite object (Sprite, RPG::Sprite, Sprite_Character):

Code:
# Making the image redder.
sprite.tone.red=100
# Making the image slightly greener.
sprite.tone.green=20
# Making the image slightly bluer.
sprite.tone.blue=10
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top