Jump to content

Working on a Reverse Opacity plugin -> Question about blending modes

Go to solution Solved by Rick Brewster,

Recommended Posts

  • 3 weeks later...

Sorry to bother you again, but I was wondering if you could point me in the direction of some resources for / fill me in on HSV blending.


Paint.Net seems to support HsvColors, albeit as a second class citizen, and I've found that reversing opacity through HSV (as an option) gives interesting, possibly better results, if the original image had been made in an application whose primary color space was HSV.


Additionally, should I support CMYK reverse opacity as well?

Link to comment
Share on other sites

The upcoming update, v4.4, will actually make working with HSV a lot easier.


Effects will be able to use Direct2D, including its robust imaging/effects system. There are effects built-in to Direct2D that handle conversion to and from RGB and HSV/HSL. See here and here. And you get full 32-bit floating-point precision per component. On top of that you can write pixel shaders to create your own Direct2D effects that you combine with other Direct2D effects.


I don't really know anything about blending in HSV though. I would probably convert to RGB and do the blending there, although obviously the precision afforded by integers in the current release of PDN are not too friendly for that.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html


Link to comment
Share on other sites



There are some things which trouble me about HSV: Colors approaching white all feature low saturation. But what is the equation that is used to desaturate a color when approaching white? To reverse this, I would need to add saturation to a color.


And how should hue be calculated, if it's based off of a 360 degree circle? If I have a hue at 0 and 180 degrees, which halfway point (90 degrees or 270 degrees) is correct? Should I use RGB blending for hints here?

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