Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Better Colorize for Ren'Py

Use a shader to closely replicate hand-coloured images in-engine. · By Feniks

Possible to recolor multiple images at once?

A topic by Nadia created 40 days ago Views: 68 Replies: 2
Viewing posts 1 to 2

Hi! I really appreciate your tutorials and tools, they've been really helpful for me to understand how Ren'Py works 😊

I have a question about this tool—

Would it be possible to use your colorizer to recolor multiple images simultaneously to the same color scheme, such as to create alternate UI themes? My thinking was that maybe I could use variables similar to the character creation example in your tutorial, but instead of hair colors, the options would set a variable to affect buttons with specific prefixes or something, like "ui_%s.png> (as an example). Would that work, or does the image declaration with the colorize transform expect a single image input/output?

I know ErebusWulfe's Instant GUI contains a recolor option for various UI elements but I'm not sure if that's as fine-tuned as your colorizer plugin.

Thanks!

Developer(+1)

You can certainly use it to recolour any number of images, but at minimum you're going to need to show every image you want to recolour at a transform. This is how any recolouring will work unless you're using dynamic image paths and have multiple physical files in different recolours. There isn't an easy "recolour all images with this prefix" solution for in-game recolouring I'm afraid. If you declare an RGBColorize object though, you can use the transform like

define ui1 = RGBColorize(...)
define ui2 = RGBColorize(...) 
default persistent.ui = 1
init python:
    def color_ui():
        if persistent.ui == 1:
            return ui1.transform
        else:
            return ui2.transform

And then you could show your buttons etc with `at color_ui()`

Good to know, thank you!