Hello everyone!
I would like to apply matrix color to LiveComposite (I have an animated sprite here, lip-flapping and blinking). I want to use it for night/evening sceneries, but I can't find the way to make this... The solution is pretty simple, I guess, but I just can't realise how to do this ^^"
Any help will be appreciated!
Tint for LiveComposite?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Re: Tint for LiveComposite?
Try the ALPHABLEND() function...
I think you can create a "color" as an image, but I forgot the code for that... Not sure if it accepts "alpha" as one of the "colors"... But alphablend would work with an image.
It will not "colorize it", it will "tint" it, as a transparent overlay. (Thus, blacks will also gain the "color" of the tint.) However, if you have a tinted version of that image, with the shades, it will then blend perfectly, only tinting where you have the colors that exist in the overlay image, by a percentage.
I think you can create a "color" as an image, but I forgot the code for that... Not sure if it accepts "alpha" as one of the "colors"... But alphablend would work with an image.
It will not "colorize it", it will "tint" it, as a transparent overlay. (Thus, blacks will also gain the "color" of the tint.) However, if you have a tinted version of that image, with the shades, it will then blend perfectly, only tinting where you have the colors that exist in the overlay image, by a percentage.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Tint for LiveComposite?
Code: Select all
init python
def ColorBlend(d, color="#000", alpha=.5):
return AlphaBlend(Transform(d, alpha = alpha), d, Solid(color, xysize=(config.screen_width, config.screen_height)), alpha=True)
image darkend_sprite = ColorBlend(Image("sprite.png"))
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: Tint for LiveComposite?
or... (for LiveComposite)
By the way, about alpha in hex code:
https://css-tricks.com/8-digit-hex-codes/
Code: Select all
image storm normal = LiveComposite((config.screen_width, config.screen_height),
(0, 0), "image.png",
)
image storm night = LiveComposite((config.screen_width, config.screen_height),
(0, 0), "image.png",
(0, 0), "#0009",
)
image storm evening = LiveComposite((config.screen_width, config.screen_height),
(0, 0), "image.png",
(0, 0), "#0225",
)
image storm moning = LiveComposite((config.screen_width, config.screen_height),
(0, 0), "image.png",
(0, 0), "#7105",
)
By the way, about alpha in hex code:
https://css-tricks.com/8-digit-hex-codes/
Re: Tint for LiveComposite?
Oh my! Thank you everyone! I'll try it all.
Who is online
Users browsing this forum: No registered users