Jump to content
How to Install Plugins ×

Color Replacer


NinthDesertDude

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 NinthDesertDude
updated google link
  • Like 1
  • Upvote 7
Link to comment
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.

swIFX9v.png

 

 

 

Link to comment
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
Link to comment
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

Plane_Sig2.gif

Link to comment
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

Xkds4Lh.png

Link to comment
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
Link to comment
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

 



 

SloppySig.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

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

Link to comment
Share on other sites

  • 11 months later...

I guess I won't be able to use this. When I click the link a Google Drive window opens and instead of letting me download the zip archive and open it with Windows it demands that I install an app that I probably won't ever use again.

Not to mention that this page doesn't explain what to do with the file once it is downloaded.

Link to comment
Share on other sites

Hi @Sidecar Bob and welcome to the forum :)

 

Sorry you are a bit perturbed, but I'll go easy on you, as you are new 😁

 

Each plugin developer hosts their zips in a variety of ways.  In this case, please go to the white arrow, top right, where I've shown it in a red box.  This will download the zip to your computer's download folder.

 

replace-colors.png

 

Unzip it and put the .dll into the Paint.net Effects folder. This PC > OC (C:) > Program Files > paint.net > Effects.

  • Like 1

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

I wonder if the browser one uses, makes a difference?  I used Firefox to click on the link and got something totally different to you @AndrewDavid

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

6 hours ago, Sidecar Bob said:

I guess I won't be able to use this. When I click the link a Google Drive window opens and instead of letting me download the zip archive and open it with Windows it demands that I install an app that I probably won't ever use again.

Not to mention that this page doesn't explain what to do with the file once it is downloaded.

I've attached a copy of it to this message for you. All effect plugins are installed the same way, by dropping things in the Effects folder, usually located at C:\Program Files\paint.net\Effects (or wherever else you've installed or placed paint.net). Open the zip by clicking on it and you should be able to just drag the .dll to the Effects folder, then restart paint.net.

Replace Colors V1.0.zip

Link to comment
Share on other sites

I think this is probably the culprit

Quote

 

Security update for Google Drive

Google Drive is releasing a security update that will apply to some Drive files. The security update will make Google Drive files more secure by updating their links to include a resource key and may lead to some new file access requests.

 

I'll try updating links to my downloads now

Link to comment
Share on other sites

  • 1 year later...

Sorry about that. I didn't tell the forum to send me email notifications (something I routinely advise new members to do on forums I moderate on :glum:)(I have corrected that now :roll:). And without a notification to remind me I completely forgot about this until I came back for something else and noticed it.

 

Anyway, I have downloaded the DLL and copied it into the folder indicated and it seems to work. Thanks very much.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...