My first attempt at a script and my first time programming in JavaScript so please excuse any newbie errors. Any feedback on non-idiomatic PJSR programming, bugs or improvements will be gratefully received.
The ColorMask script is intended to provide a convenient and interactive method for tweaking color. It builds a mask that selects a range of hues in an image. You then apply the mask and manipulate the image, e.g. with CurvesTransformation (probably using a real-time preview to examine the results of fine adjustments.)
I have been meaning to play with PI scripting for a while. David Ellison, who shares a scope with me at SRO, suggested that I try to automate Bob Franke's process for getting nice Hubble Palette colors in PhotoShop (
http://bf-astro.com/hubblep.htm). Trying to do the whole process in one go seemed a bit hard, so this is a first step towards that. The following demonstrates the use of the ColorMask script to do a quick & dirty color adjustment on a SHO narrowband image of the Soul Nebula.
Here is the "before" image created simply with a [L]RGBCombine followed by an unlinked STF stretch applied with HistogramTransformation. It shows the usual magenta stars. The worst of the green was fixed by the unlinked stretch but the colors aren't particularly attractive.
This is the after image resulting from successive application of a few color masks and manipulation with curves. This was just slapped together quickly as an example. It is not intended to be a perfect image - just an improvement on the one above
Here are the four steps that I used.
1. Make magenta mask (just click on the Magenta button) then apply desaturation twice:
2. Apply green mask (just click on the Green button) then reduce Green slightly:
3. Apply cyan mask (you can probably guess this one) then use Curves to boost Blue and Red, reduce green and increase saturation:
4. Apply yellow mask and boost Red. Voila!
I hope some of you find the script useful. If you have ideas for improvements let me know.
Cheers,
Rick.
NB: as of PixInsight 1.8.5 ColorMask is now included as one of the standard scripts. I would remove the download but it doesn't look like editing the post allows me to do that.