Remove Green (SCNR)

Subtractive Chromatic Noise Reduction. Suppresses an unwanted colour cast on one channel by pulling it toward a “neutral” built from the other two channels, so greys stay grey while the targeted hue is removed. Classic use case is the green cast left behind after star removal or in continuum-subtracted narrowband; the tool generalises the same operation to any RGB or CMY channel.

1. Using the tool

The dialog stays open after Apply so you can run the same settings on other images — the active document is picked up automatically on the next Apply, no need to reopen.

Target channel

Which channel is pulled toward neutral. Default is Green — the classical SCNR. Other options:

Amount

How strongly to pull the target channel toward neutral, 0.00–1.00. At 1.00 any excess over the neutral comparator is removed entirely (full SCNR); at 0.00 nothing happens. The default 1.00 is usually right for a visible cast; dial back when the subject itself is legitimately green (planetary nebulae with strong OIII, some comets, aurorae) and you want to keep that colour.

Neutral mode

What counts as the “neutral” level the target channel is compared against. All three are built from the other two channels:

Preserve lightness

On by default. SCNR by itself only subtracts from one channel, so pixels become darker as well as less tinted. With this on, SSSC measures each pixel's perceived lightness (Rec. 709 luma) before and after, then scales all three channels equally so the pixel's lightness is restored while its new colour balance is kept. A highlight-safety cap prevents any channel from exceeding 1.0 during that rescale, so star cores and other bright features don't get pushed into clipping. Turn it off if you specifically want the darkening behaviour of raw SCNR.

Masks

If the destination document has an active mask, SCNR runs on the whole frame and then blends through the mask — so the correction only affects masked regions, with original pixels preserved everywhere else. The mask is resampled to match the image dimensions if needed.

Preset grip

The handle at the bottom-left of the dialog carries the current four settings (channel, amount, mode, preserve-lightness) and can be dragged onto the canvas to create a shortcut tile, or dropped directly onto an image to apply those settings headlessly. Double-clicking the tile reopens this dialog with those settings pre-filled.

2. Technical details

RGB only; mono and single-channel inputs pass through unchanged. Operates on a float32 [0,1] working copy.

2.1 Core SCNR operation

For a target channel C_c with the other two channels denoted A and B, and a user amount a ∈ [0,1]:

C'_c \;=\; C_c \;-\; a\cdot\max\!\left(0,\;C_c - N\right)

where N is the neutral comparator built from the other two channels. Only positive excess over N is removed — the target channel is never pushed up, so pixels that are already at or below the neutral level are untouched. The result is clipped to [0,1].

2.2 Neutral comparator

Three modes, selected by the dropdown:

N_{\mathrm{avg}}=\frac{A+B}{2}\,,\quad N_{\max}=\max(A,B)\,,\quad N_{\min}=\min(A,B)

Average is the default and the most common SCNR variant. Max is more conservative (removes less), min is more aggressive (removes more), because N_min ≤ N_avg ≤ N_max and the amount removed scales with C_c - N.

2.3 CMY targets via inversion

SCNR is defined on primary channels, but the subtractive relationship means the same operation on the complement of the image removes a secondary-colour cast. For a CMY target channel, SSSC maps C ↔ R, M ↔ G, Y ↔ B and performs:

\mathrm{SCNR}_{\mathrm{CMY}}(\mathbf{c}) \;=\; \mathbf{1} - \mathrm{SCNR}_{\mathrm{RGB}}(\mathbf{1}-\mathbf{c})

with the SCNR on the right-hand side applied to the complementary primary channel. No new math is required — the same formulas from § 2.1–2.2 run on the inverted buffer.

2.4 Preserve lightness

Raw SCNR subtracts, so lightness drops. When the checkbox is on, SSSC rescales all three channels of each pixel to restore the pre-SCNR Rec. 709 luma while keeping the new chromaticity:

Y \;=\; 0.2126\,R \;+\; 0.7152\,G \;+\; 0.0722\,B

Per pixel the raw scale would be s = Y_before / Y_after, but applying that blindly could push bright, already-near-white pixels above 1.0. SSSC caps the scale so no channel exceeds unity:

s \;=\; \min\!\left(\frac{Y_{\mathrm{before}}}{Y_{\mathrm{after}}},\;\frac{1}{\max(R',G',B')}\right)

where R', G', B' are the post-SCNR channel values. The final output is (R', G', B') × s, clipped to [0,1]. This keeps star cores and other high-end features from clipping during the rescale, at the cost of leaving those specific pixels slightly dimmer than full luma preservation would. For typical starfields the effect is visually invisible.

2.5 Mask-aware output

When the destination document carries an active mask m ∈ [0,1], the processed buffer is blended against the original:

\mathrm{out} \;=\; \mathrm{src}\cdot(1-m) \;+\; \mathrm{SCNR}(\mathrm{src})\cdot m

Masks of a different resolution than the image are nearest-neighbour resampled to match (OpenCV when available, NumPy index-based fallback otherwise). Images with more than three channels (RGBA etc.) keep their extra channels untouched — only the first three are passed through SCNR and written back.