Hi everyone!
I recently became obsessed with how I might be able to program an algorithm for recoloring item sprites, and after many long nights, I have managed to program something that yields quite impressive results with little overhead!
The algorithm uses existing sprites as input to generate a colored item that is cached/saved on the website for future reference. If the base image is changed or the cached is cleared, it will automatically generate a new image when requested by the game client.
It loads item details that allow me to set which channel should be colored and how. For instance, the cheerleader uniform colors pixels relative to how saturated the color is, while the maid outfit colors significantly dark pixels. For some items, such as the Victorian Jacket, it can also segment colors into groups and only color the group I ask it to. This can allow some colors, such as colored buttons, to be kept while recoloring others.
It's quite a complex system and I will need to adjust and expand it further over time to make sure all items yield good results for all colors.
Dynamic colors for item sprites will be a backer-only feature:
Additionally, I have been playing around with new dyes, such as glitter-dye and rainbow-colored dye.
There is also a marble or stone-like color that I expect will be used in the future when inspecting petrified characters.
I've super excited that I was able to make this and I am looking forward to having it go live on the public server!
Cheers,
Tinon