Jump to content

Conditional Hue/Saturation Effect Available


evanolds

Recommended Posts

  • 4 weeks later...
  • 4 weeks later...

Hello All,

I have an image of a locomotive for MS Train Simulator that I want to convert from blue to red. I thought that this plugin would be perfect for this job, but I have not found a way to precisely control the result I am looking for. The main part of the image has a HSV of 203-85-63 and I want that converted to HSV 343-100-73.

It does a very good job converting all the colors and I can get my main color close, but I can't hit it precisely or consistently. I notice that the color picker in PdN uses HSV format, but this plugin uses HSL. I am assuming that this is throwing me off because the color picker H range is 0-360, S range is 0-100, and V range is 0-100. The plugin H range is -180 to 180, the S range is 0-200, and L range is -100 to 100.

Is this the tool I need to use or is there something else I need to get, or is what I am trying to do possible?

Thanks,

Ted

TBCSig.png
Link to post
Share on other sites
Hello All,

I have an image of a locomotive for MS Train Simulator that I want to convert from blue to red. I thought that this plugin would be perfect for this job, but I have not found a way to precisely control the result I am looking for. The main part of the image has a HSV of 203-85-63 and I want that converted to HSV 343-100-73.

It does a very good job converting all the colors and I can get my main color close, but I can't hit it precisely or consistently. I notice that the color picker in PdN uses HSV format, but this plugin uses HSL. I am assuming that this is throwing me off because the color picker H range is 0-360, S range is 0-100, and V range is 0-100. The plugin H range is -180 to 180, the S range is 0-200, and L range is -100 to 100.Ted

You have wrong understanding of this plugin. Use Conditions panel to define which color you want to change (Conditions panel = color wheel and 4 sliders beneath it). Then in Action panels you define the nature of changes to be performed on your selected color range. There are + and - ranges in Action panels because by editing you can either increase or decrease those parameters.

If it still doesn't serve you well enough, you could alternatively try "Color to Alpha" plugin to separate your object from backround.

Link to post
Share on other sites

I think I have a good understanding of the mechanics of the plugin. I use the right hand window to isolate the range of colors I want to operate on. Then I select Add to add the amount of hue I want to get to my desired color, adjust the saturation, and again, select Add to add the amount of lightness.

And it does - well - it does it, but not to the exact color I'm shooting for, and I just don't understand why. It's just math. Right?

OK, a challenge. Open a new image and just make a solid square block with this RGB color: R 24, G 107, B 161

Now change the color to R 187, G 0, B 51 using this plugin. If you are successful on the first attempt - please let me know how it is done. This is a very simplistic example, but if you can tell me how to make the one solid color to change as I expect it to, then it should work for a complex image that has many shades of that color and adjust them accordingly, too.

I'm pretty much a noob at image editing, so please forgive me if I am way off the mark on this, and let me know how this should really be done.

Thanks!

TBCSig.png
Link to post
Share on other sites
Open a new image and just make a solid square block with this RGB color: R 24, G 107, B 161

Now change the color to R 187, G 0, B 51 using this plugin.

If you want to do this particular type of action, I think a color replacement plug-in would much better suit your needs. I did a very brief look in Paint.NET and among the forums and didn't see a plugin for this, but you wish to do a global, solid color replacement you can use the paint bucket tool with a tolerance of 0% and "Global" mode (under the "Flood Mode:" pulldown). This tool with these parameters gives you an exact color replacement, and I would recommend it for what you are trying to do.

It's just math. Right?

The HSL or HSV to RGB and RGB to HSV or HSL colorspace conversions are nonlinear transformations that do not provide a one-to-one mapping of RGB triplets to HSV triplets and vice-versa. This plugin is ill-suited for exact color replacements because of this.

Let me know if the paint bucket option suits your needs. If you are trying to replace a single color, or a range of colors, with one solid color, the paint bucket tool should do it (play around with various tolerance levels and use "Global" mode).

There are no warranties whatsoever on my plug-ins. Use them at your own risk. You may redistribute them if you'd like, but I'd prefer you just link to the download on my site. Please do not modify and redistribute.

Link to post
Share on other sites

The HSL or HSV to RGB and RGB to HSV or HSL colorspace conversions are nonlinear transformations that do not provide a one-to-one mapping of RGB triplets to HSV triplets and vice-versa. This plugin is ill-suited for exact color replacements because of this.

Let me know if the paint bucket option suits your needs. If you are trying to replace a single color, or a range of colors, with one solid color, the paint bucket tool should do it (play around with various tolerance levels and use "Global" mode).

Yes, I understand that RGB to another color model is not linear, but it can be converted back and forth, with a little bit of loss, true. But that is not really the problem here. Let's just forget RGB and work with HSV.

I have a color that has an H, S, and V component. The Hue/Saturation tool allows me to "Add" to the hue and lightness, and adjust saturation (another add I assume, but maybe that is where I am getting goofed up.)

If I want it to add 140 to the hue, 15 to saturation, and 10 to lightness, the result is not my expected H 343, S100, V73, it is something different. I get H 343, S 88, V 88. Why is that?

OK, so I've got the "picture" - so to speak - that this is not what the plugin is supposed to do. So where do I find that "color replacement tool"?

Thanks!

Oh, and I don't want to replace just one color, but many shades of that color. My baseline color makes up about 90% of the image, and is complex enough that I don't want to hand replace all the different shades by hand.

TBCSig.png
Link to post
Share on other sites
  • 2 months later...
  • 1 month later...

sorry to get in the game so late, but how did you manage to only change the colors of the trees? It looks like a thing I really want to do, but I'm stopped by the selection tool...

Hope that you stille follow this thread.

Thanks in advance.

Kejtet

headbanner500x101.jpg
Link to post
Share on other sites
sorry to get in the game so late, but how did you manage to only change the colors of the trees? It looks like a thing I really want to do, but I'm stopped by the selection tool...

Hope that you stille follow this thread.

Thanks in advance.

Kejtet

Read viewtopic.php?p=65140#p65140

See if my tips can help you?

The_next_thousand_words_by_0_ASH_0.png

All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]

Link to post
Share on other sites
  • 1 month later...

A few post above yours.

sorry to get in the game so late, but how did you manage to only change the colors of the trees? It looks like a thing I really want to do, but I'm stopped by the selection tool...

Hope that you stille follow this thread.

Thanks in advance.

Kejtet

Read viewtopic.php?p=65140#p65140

See if my tips can help you?

The_next_thousand_words_by_0_ASH_0.png

All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]

Link to post
Share on other sites

A great plugin. Thanks Evan.

While using it, I thought about using a picker to help set the range.

In other words you bring up the dialog, then use a picker on the image to get a first cut of the colour range to target. Adjust manually after that. (If the picked colours were overlaid on the colour wheel it would help.)

I'm not familiar with the PDN API and how it can be accessed from plugin code. Has this sort of thing been done before? If it has I'd be prepared to spend a little time trying to integrate it into the code that Evan has generously provided.

Link to post
Share on other sites
I'm not familiar with the PDN API and how it can be accessed from plugin code. Has this sort of thing been done before? If it has I'd be prepared to spend a little time trying to integrate it into the code that Evan has generously provided.

I presume he copied it from the PDN source to his plugin.

KaHuc.png
Link to post
Share on other sites
  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • Create New...