Can I use Matrixcolor in Composites?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
arlj11
Regular
Posts: 28
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Can I use Matrixcolor in Composites?

#1 Post by arlj11 »

I want to have text over a darken picture without having to edit the picture itself. I feel Matrixcolor will be quicker than editing the image itself if I decide to change the image at a later date.

Is there another way to do this if Matrixcolor can't be used in Composites?

User avatar
henne
Newbie
Posts: 17
Joined: Tue May 25, 2021 6:10 am
Contact:

Re: Can I use Matrixcolor in Composites?

#2 Post by henne »

You can use HueMatrix:

https://www.renpy.org/doc/html/matrixco ... #HueMatrix

Code: Select all

image your_image:
    "your_image_comp"
    matrixcolor HueMatrix(40)

arlj11
Regular
Posts: 28
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Can I use Matrixcolor in Composites?

#3 Post by arlj11 »

henne wrote: Thu Dec 02, 2021 6:50 am You can use HueMatrix:

https://www.renpy.org/doc/html/matrixco ... #HueMatrix

Code: Select all

image your_image:
    "your_image_comp"
    matrixcolor HueMatrix(40)
That works to tint the image. But now how do I overlay the text. The image doesn't show if I add text to the bottom of the code above and the is at the bottom of the screen.

User avatar
zmook
Veteran
Posts: 421
Joined: Wed Aug 26, 2020 6:44 pm
Contact:

Re: Can I use Matrixcolor in Composites?

#4 Post by zmook »

Try something like:

Code: Select all

transform darken:
    matrixcolor BrightnessMatrix(-0.2)

image eileen composite = Composite(
    (300, 600),
    (0, 0), At("your_image.jpg", darken),
    (0, 0), Text("hello"),
 )
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM

arlj11
Regular
Posts: 28
Joined: Mon Jan 06, 2020 12:30 pm
Projects: 4Wins
Deviantart: arlj11
Github: arlj11
Contact:

Re: Can I use Matrixcolor in Composites?

#5 Post by arlj11 »

That worked. Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users