Joshua Lamusga 264 Posted October 14, 2015 Share Posted October 14, 2015 (edited) 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. 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 September 25, 2020 by toe_head2001 Fixed broken images 7 Quote Link to post Share on other sites
sashwilko 509 Posted October 14, 2015 Share Posted October 14, 2015 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. Quote Link to post Share on other sites
Rick Brewster 1,792 Posted October 14, 2015 Share Posted October 14, 2015 sashwilko, you can also download CodeLab and copy the code from the "Hidden Content" block (above the "download the plugin" link) into it. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to post Share on other sites
sashwilko 509 Posted October 14, 2015 Share Posted October 14, 2015 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 ? Quote Link to post Share on other sites
BoltBait 3,312 Posted October 14, 2015 Share Posted October 14, 2015 You are using a VERY old version of CodeLab. You need to upgrade... http://boltbait.com/pdn/CodeLab/ Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to post Share on other sites
sashwilko 509 Posted October 14, 2015 Share Posted October 14, 2015 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. Quote Link to post Share on other sites
Ego Eram Reputo 2,838 Posted October 14, 2015 Share Posted October 14, 2015 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. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to post Share on other sites
Joshua Lamusga 264 Posted October 14, 2015 Author Share Posted October 14, 2015 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. 1 Quote Link to post Share on other sites
racerx 273 Posted October 15, 2015 Share Posted October 15, 2015 (edited) 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. Edited October 15, 2015 by racerx 1 Quote Link to post Share on other sites
Djisves 595 Posted October 16, 2015 Share Posted October 16, 2015 (edited) 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 October 16, 2015 by Djisves Quote Link to post Share on other sites
Joshua Lamusga 264 Posted October 16, 2015 Author Share Posted October 16, 2015 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..." 1 Quote Link to post Share on other sites
doughty 326 Posted October 17, 2015 Share Posted October 17, 2015 (edited) 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. Edited October 17, 2015 by doughty 2 Quote Link to post Share on other sites
Maximilian 1,927 Posted October 20, 2015 Share Posted October 20, 2015 Thanks for the plugin and the source code, Anthony! Follows a small contribution: Replace Color for PdN 3.5.11.zip 3 Quote Link to post Share on other sites
Cc4FuzzyHuggles 320 Posted November 8, 2015 Share Posted November 8, 2015 (edited) 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 November 8, 2015 by Cc4FuzzyHuggles 1 Quote *~ Cc4FuzzyHuggles Gallery ~* Link to post Share on other sites
Hypure 13 Posted November 9, 2015 Share Posted November 9, 2015 Nice been wanting this! Good one. Quote Link to post Share on other sites
WIndjammer 2 Posted January 13, 2017 Share Posted January 13, 2017 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.