This is a recreation of the "Manual Color Correction" tool in Paint Shop Pro. Basically it lets you change the colors by transforming one color into another.
I mainly use it for skin color correction on portraits: select the original color of the skin in the picture as primary color, take something along the lines of RGB 200,180,160 as secondary color, and this tool, with default settings, should give you a nice warm skin color.
There are a couple of settings:
"Foreground To Background", checked on by default, takes your primary and secondary colors to work with. If you uncheck this, you can manually choose the two colors in "From" and "To".
"Keep Hue","Keep Saturation" and "Keep Value" allow you to keep the original hue/saturation/value of the image. Essentially, if you put them all on 100, your image (almost) doesn't change.
"Fix Value Discontinuity" and "Fix Saturation Discontinuity" could be useful when choosing colors in the extreme end of the value or saturation spectrum. It "shifts" both colors more towards the "middle" of the spectrum, giving smoother results (although changing these settings will prevent the "From" color to fully transform into the "To" color). Play with these settings if you get weird results
This effect was made with CodeLab, and the source is included! (with Dutch comments.. sorry for that )
It's probably not nearly as efficient as it could be, so feedback is very appreciated!
Hope you like it!
As requested by BoltBait, here are some screenshots!
First the "before" image, where people have purplish skin (it's a white balance thing, I never completely figured it out on my camera )
Here's the color correction tool with the used settings:
And here's the result: