Recommended Posts

Overview

Color Replacer can convert pixels in the current selection from one color to another. Pixels with colors that almost match (based on a % match called tolerance) will be affected too, but the original color will be mixed with the new color. It is located under the Adjustments tab.

 
2dt3t6r.png

10zxz0m.png
2uetdtt.png
2uf7gxy.png
 
Purpose and Application
Use this plugin to remove backgrounds that are close to being single colors.

 

Affected color: The color that you want to change.
 
New color: The new color to choose.
 
Affected color transparency: The transparency of the color to be changed.
 
New color transparency: The transparency of the new color.
 
Tolerance: Instead of just replacing the exact color you choose, why not replace colors relatively close to it as well? Increasing the tolerance increases the range (in RGB) of colors that can be selected. Higher tolerances catch more similar colors. 255 catches everything.
 
Max hue/sat/val difference: These are restrictions placed on the tolerance. When you specify a color, some photos may need a high tolerance to match the colors of your choice. For example, a red gradient for the background of an orange gradient logo. In this case, the maximum hue difference must be limited so only pixels within a certain hue range of the initial color are selected... leaving the orange pixels alone.
 
Color mixing hardness: When pixels are replaced by the chosen color, the further they were from the original color, the less effect the color replacement has. This hardness setting allows you to change this behavior by either tweaking the softness or setting it to 255 so there is no soft color mixing.
 
Remarks
When replacing with transparency, consider getting AA's Assistant so that you can remove some of the aftermath (color replacement is imperfect by nature and will usually leave expanses of tinted, lightly transparent areas that AA's Assistant removes).
 
Download: Replace Colors

Source code: Github

The MIT license does not apply to past users of the source code. Those users still have my explicit permission to do whatever they want.

I just had to use a license to avoid ambiguity.

Edited by Joshua Lamusga
Source code platform changed
  • Upvote 7

Share this post


Link to post
Share on other sites

Can you not upload the file here ? Filedropper just keeps going in a loop and asking me to enter the catchpa over and over again, even though I have entered the correct one.

Share this post


Link to post
Share on other sites

sashwilko, you can also download CodeLab and copy the code from the "Hidden Content" block (above the "download the plugin" link) into it. 

Share this post


Link to post
Share on other sites

sashwilko, you can also download CodeLab and copy the code from the "Hidden Content" block (above the "download the plugin" link) into it. 

I tried, I won't build for someone who doesn't understand code, why can't the author post the .dll here ? 

Untitled%201_zpshvfkei78.jpg

Share this post


Link to post
Share on other sites

You are using a VERY old version of CodeLab. You need to upgrade... http://boltbait.com/pdn/CodeLab/

Make NO difference to anyone who doesn't understand code (as I mentioned in a post above) it wont even let me "save as" to start with. I did ask why the OP can't upload the .dll here like others do. 

jrpamu.jpg

Share this post


Link to post
Share on other sites

The message is telling you that you need to save the code before building the dll. BoltBait added this to ensure the code is saved as a backup.

Use File > Save As... to save the file with the filename "Color Replacer.cs". Then you are good to build the dll.

Share this post


Link to post
Share on other sites

Sashwilko, the forum doesn't allow me to directly upload a .dll file because it considers .dll files potentially dangerous. I have uploaded the file as a zip file to meet your request, and updated my post. I'm sorry for all the trouble you've experienced in trying to install this plugin. In the future, I will upload all my dll files inside zip files.

  • Upvote 1

Share this post


Link to post
Share on other sites

This works very much like a Chroma-Key filter used in many video editors. I think it works well and will be useful, thanks. It helps to use the color selector tool to get the desired color.

 

OlfAfgT.jpg

Edited by racerx
  • Upvote 1

Share this post


Link to post
Share on other sites

Thank you for a useful plugin Anthony. I have downloaded it and will use it accordingly.

 

I can see the thinking behind your decision to put it under Adjustments, and I understand why. However, this is a plugin that does much the same job as a number of other plugins which are all found under Effects > Color. IMO, it makes more sense there. 

Edited by Djisves

Share this post


Link to post
Share on other sites

Thank you for the compliments, racerx and Djisves. It's highly appreciated :)
 

 

However, this is a plugin that does much the same job as a number of other plugins which are all found under Effects > Color. IMO, it makes more sense there.

That's a valid point. I guess I didn't look at the Effects submenu in Codelab because the ones that I have don't match my plugin (I have no plugins that use the 'Color' menu).

 

Updated (all cosmetic updates):

- Now in Effects > Colors submenu.

- New icon.

- Url link updated to this thread.

- Menu text had six dots on accident. Now has 3, as in "Replace Colors..."

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks for moving this to colors.

Played with this a bit yesterday and I think works great. I'll post something soon.

 

The fall leaves are so close in color that I had to make several  passes to get a variety of green color, which was expected.

Love the ability of color transparency. I'll be playing with that soon.

Thanks for creating this plugin.

 

Replace%20colors%20test.png

Edited by doughty
  • Upvote 2

Share this post


Link to post
Share on other sites

The more I use this plugin the more I love it. Thank you very much! It's one of the better color replacing plugins and color removing plugins available. :)

Edited by Cc4FuzzyHuggles
  • Upvote 1

Share this post


Link to post
Share on other sites

Hi Anthony,

 

Thank you for a great and very useful plugin. I am currently working on a project described here where your plugin is mentioned as almost working for what I need to do. In this project, I work with creating very small pixeled map icons, the working area is no larger than 22x22 pixels. When creating them I often need to change all pixels to the same colour. I can almost do that with your plugin, and I would completely be able to if I didn't have to enter the Transparency. Would it be possible to update your plugin with this part as an option to turn on/off?

 

Best,

 

Matthias

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now