Jump to content
How to Install Plugins ×

Convert color deviation to alpha variation of a single color

Recommended Posts

Hello, I've made an effect that converts pixels to a single color and adjusts the alpha value based on deviation from that color. Essentially it's a grayscale to alpha converter, capable of extracting black or white objects from a background of the other color, but it could be used with other colors as well. Should the image contain alpha values already, it can be blended with the calculated alpha. The resulting image has only one RGB color, with all variation in the alpha channel only.


Download the plugin

Menu: Effects > Color



Why this plugin? There are multiple plugin packs (1, 2) that advertise begin able to perform the same task or similar tasks. However, I've found that they do not function quite as I'd like, or maybe I've misunderstood how to use them. Nevertheless, this plugin is as easy to use as it gets.


To install, extract the folder and run the batch install file, or locate your paint.net effects and paste the .dll file there manually.


I would also appreciate any feedback on the plugin! Maybe you have an edge case for which it doesn't work, or an improvement that should be made.


EDIT: Updated and renamed plugin, title and description


  • Like 1
  • Upvote 1
Link to comment
Share on other sites

Thank you @felix-hilden for sharing.

Reading your description, I thought we would be able to select any of the basic RGB colours to keep. So I'm a bit disappointed that we only have a choice of black or white.


The UI for those wondering:


I did some testing to compare with some of the many options available. I used a yellow background to make the details visible at this size: 


EDIT: I forgot to mention that I do like the results!



Edited by Djisves
  • Like 1


Link to comment
Share on other sites

  • felix-hilden changed the title to Convert color deviation to alpha variation of a single color

Thanks a bunch for the feedback @Djisves! I updated the plugin to be able to select arbitrary RGB colors as the solid. I'm not sure why the examples you provided are much lighter in some places, likely because of the additional parameters doing something... additional, or that the deviation is calculated differently. In any case, much appreciated!

  • Upvote 1
Link to comment
Share on other sites

Nicely done Felix. I've taken the liberty of adding the menu location & an image of the new UI. 


I recently added to the guidelines to publishing plugins. The changes I made are in accordance with items 5 & 6 in the second post.

  • Like 1
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.

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...