Recoloring tool - March 12th stream

Log-in or register.

Recoloring tool - March 12th stream

Published by on March 12th 2023.

A simple way to recolor images, especially cursors or icons, has been one of the most requested features for years. I have created a simple script for replacing one color with another and some people have been using it, but it was working only in very specific situations, because only the exact colors were replaced. In the last weeks, I have been trying to improve the situation.

YouTube stream: https://youtu.be/XDvzvgHtmyg

Why there is no recoloring tool in the current version?

The simple answer is: Because the problem is more difficult than it seems. While replacing only the exact color with another one is simple, if also similar colors are to be replaced, there are complications.

The first problem is to somehow decide whether to replace the color of a pixel or not. There already is a FloodFill tool that deals with the same problem by allowing users to define a "Tolerance" value and allows users to choose one of several matching modes. This tool can actually be used for simple color replacing and thus I did not see a need to create another one. A specialized tool for color replacing could use a similar system.

Another problem is what the final color of a pixel should be if the original color of the pixel is not exactly the same as the color we are trying to replace. If we are trying to replace red color with blue color, what do we do with a dark red color, or with an orange color? These colors can be thought of as a mix of the red color (we are trying to replace) with another unknown color. To make matters worse, we do not know how the red color was mixed with that unknown color. In case of the dark red color, it may be reasonable to assume that it is a mix of black and red and that we should replace it it with a similar blend of black and blue. In the case with orange, we can assume that that is is a mix of yellow and red and that we should replace it with a blend of yellow and blue. But there are still multiple ways how to obtain orange from red and some other color. We are left to guess.

Current solution

rsrc/recoloring-tool.jpg image

The current preview build contains a new tool modifier for color replacing and it is still work in progress. While it works decently in simple cases, when you want to replace color in a drawing or a cursor. Addition info in the stream.

Recent comments

user icon baller baller chicken dollar registered user on March 13th 2023

ok

user icon RIDDLER registered user on March 14th 2023

This new re-coloring tool is useful. Please add it.

user icon Anonymous
What about ICL files?
Select background
Vista & Win 7 icons
I wish there were...