Parametric masking in GIMP, powered by a curve editor…

Key points
- Create a parametric mask in GIMP from luminance or individual colour channels.
- Shape your mask with a tone curve for precise control.
- Live preview as you adjust = no guesswork.
- Non-destructive: the plug-in always works on a new layer.
- Free download, runs on Linux, Windows, and macOS.
Create a parametric mask in GIMP: let the image do the work
Creating a mask by hand in GIMP takes time and patience. You might build a selection with the selection tools and convert it to a mask, use Quick Mask mode to paint and refine a selection freehand, or paint directly onto a layer mask with a brush.
Several methods automate at least part of the process of creating a mask. Luminosity masks, blend-if, and AI-driven masking options make life considerably easier.
Parametric masking allows you to select parts of an image based on specific parameters, such as colour, tone, or saturation. It targets adjustments to only the selected areas without affecting the rest of the image.
The Parametric Mask plug-in for GIMP 3 is my implementation of that approach.
What does the Parametric Mask plug-in do?
The plug-in uses a live-updating curve editor that enables you to target specific tones in the four major image channels: Red, Green, Blue, and Luminosity. The curve maps input tones to mask opacity. Pull a point up and those tones become more opaque in the mask. Pull it down and they become more transparent.

The curve approach gives you fine-tuned, automatically feathered control over a mask.
Luminance masking targets tones by brightness, across the full range from deep shadows to bright highlights. It’s ideal for dodging highlights, protecting shadows, or applying a targeted exposure adjustment. (I also have an interactive luminosity mask plug-in for GIMP 3 that takes a more guided approach. The two plug-ins are complementary, suited to different situations.)



The colour channels go further. A channel mask in GIMP built from Red, Green, or Blue opens up colour-based selections that luminance alone can’t produce: isolating a blue sky, targeting warm skin tones, or pulling a green channel mask to enhance foliage.
These parametric masks are non-destructive and repeatable. If you don’t like the result, run the plug-in again and adjust the curve. The original image data is never touched. Instead, the plug-in creates a new layer in your image and applies the parametric mask to it. You can work with that new masked layer directly, or you can copy the mask to any other layer in the image.
Inspiration and approach
The idea of parametric masking in GIMP isn’t new. Various solutions existed for earlier versions of GIMP. Recently, Yasuo Ohnishi develped a solution for GIMP 3 that uses sliders to set input and output levels. Rather than extend his work, I decided to build from scratch and take a different direction, using curves instead of sliders.
A curve is expressive and nuanced. You place points anywhere along the tone curve and shape the mask with as much or as little precision as you need. A gentle S-curve produces a soft, graduated mask. A sharp step produces a hard-edged one. The plug-in’s curve editor also shows the channel histogram, so you can tailor your curve to the histogram precisely. You can target midtones, create double peaks, or invert regions entirely—shape your curves any way you want.
The input-to-output relationship is immediately visible in the editor. And since photographers and retouchers already think in curves, there’s no new mental model to learn.
How do you use the plug-in?
The plug-in generates a layer mask from one of four source channels and applies it to a new layer directly above your target. Your original image data is never touched.
You select the channel you want to work with, then shape the mask using a tone curve. Drag points up to make those tones more opaque in the mask, drag them down to make them more transparent. The canvas updates live as you adjust.
Here’s a brief demo:
The plug-in has two modes. In whole-image mode, the mask is derived from the full visible image (hidden layers are ignored). In single-layer mode, it’s derived from the selected visible layer only. Single-layer mode is useful when your layer stack is complex and the active layer differs significantly from the overall image.
The plug-in doesn’t include HSV masking. Hue, saturation, and value masking is technically very challenging to implement correctly inside GIMP 3’s Python environment. If you need hue, saturation, or value-based masking, ART (a fork of RawTherapee) handles HSV masking well and is worth exploring. Yasuo Ohnishi has published a GIMP plug-in that integrates ART directly with GIMP.
The plug-in in detail
The plug-in dialog is built around a curve editor, with a channel selector and mask controls above it and action buttons below.

The curve editor
The tone curve’s horizontal axis represents input tones from the selected channel: shadows on the left, highlights on the right. The vertical axis represents mask opacity: fully transparent at the bottom, fully opaque at the top. The histogram of the selected channel appears behind the curve for tonal context at a glance.
The curve line colour reflects the active channel: white for Luminance, red for Red, green for Green, blue for Blue.
To add a control point, left-click anywhere on the curve. To move it, click and drag. To remove a control point, right-click it.
The two endpoint corners set the black point and white point output. They’re locked horizontally and can only be dragged up or down. Endpoints can’t be removed.
The Reset button restores the curve to a neutral straight line.
Options
The Select channel drop-down switches the source between Luminance, Red, Green, and Blue. The tone curve and histogram reset on each change, since a curve tuned for one channel is unlikely to suit another.
Invert mask flips the mask so that included tones become excluded and vice versa. That’s useful when the selection you want is the inverse of what the curve naturally produces.
Edit mask mode leaves GIMP in mask editing mode after clicking OK.
The info button
The button opens a reference dialog with expandable sections, such as how to use the tone curve and technical advice. It also shows the plug-in version and a support email link.
The Settings button
The button opens the settings dialog. From here you can check for updates manually. The plug-in also checks automatically once a week in the background and only notifies you if an update is available. You can turn automatic checking off if you prefer.
Whole-image mode
- With an open image, select the layer where you want to insert your mask.
- From the menu, go to Layer > Mask > Parametric mask. The plug-in dialog opens. The dialog defaults to whole image mode.
- Select a source channel from the Select channel drop-down: Luminance, Red, Green, or Blue.
- Shape the curve in the Tone curve section. Click once to add a control point, then drag it to position it. To remove a control point, right click on it. You can add as many control points as you want. Note: the two points at either end of the curve can only move up and down, not horizontally.
- When you’re happy with the curve, click OK. The plug-in generates the mask and applies it to the active layer.
Single-layer mode
- With an open image, select the layer where you want to insert your mask.
- From the menu, go to Layer > Mask > Parametric mask. The plug-in dialog opens. Choose Selected layer.
- You’ll see a temporary image appear. The plug-in uses that temporary image to preview the single-layer mask while you create it.
- Select a source channel from the Select channel drop-down: Luminance, Red, Green, or Blue.
- Shape the curve in the Tone curve section. Click once to add a control point, then drag it to position it. To remove a control point, right click on it. You can add as many control points as you want. Note: the two points at either end of the curve can only move up and down, not horizontally.
- When you’re happy with the curve, click OK. The plug-in generates the mask, removes the temporary image, and applies it to a copy of the selected layer.
Two complementary masking plug-ins
Alongside the Parametric Mask plug-in, I also publish the Interactive Luminosity Masks plug-in for GIMP 3. The two complement each other. They solve different problems and work well together in the same workflow.
Interactive Luminosity Masks plug-in: guided, targeted, luminance-based masking
The Interactive Luminosity Masks plug-in presents nine preset mask types across three families: Lights, Midtones, and Darks, each in standard, narrow, and narrowest variants. You pick a preset from a visual selection dialog, preview it live on the canvas, then fine-tune it using simple Darks, Midtones, and Lights sliders. No curve editing required.
It works exclusively from luminance data. It’s well suited to generate quick luminosity masks for dodge and burn work, adding a mask to a curves layer for targeted tonal corrections, or any situation where the overall tonal range is the primary consideration. It’s the natural starting point for users new to luminosity masking, and a fast option for experienced users who know which tonal band they want to target.
Parametric Mask plug-in: curve-driven, channel-aware
The Parametric Mask plug-in has no presets. The mask is shaped entirely by a tone curve you build yourself, so you control every point in the tonal range. The key differentiator is RGB channel masking: in addition to Luminance, the plug-in can generate masks from the Red, Green, or Blue channel independently. Single-layer mode adds further flexibility for complex layer stacks.
Parametric masking is the natural choice when you want complex or nuanced control over luminance masking, or when a specific colour channel holds the information the mask needs to capture.
Using both together
Both plug-ins produce layer masks, so the results are fully interchangeable and editable by any other GIMP tool. A typical workflow might use the interactive luminosity masks plug-in to quickly protect shadows during a tonal adjustment, then use the Parametric Mask plug-in to generate a red-channel mask for a separate colour correction. Different tools, same image, more possibilities.
Which plug-in should I use?
| Want a luminosity mask quickly with guided presets? | Interactive Luminosity Masks plug-in |
| Need to target a colour channel, or want full curve control over the mask shape? | Parametric Mask plug-in |
| Need HSV masking or the most powerful parametric tools available? | ART via Yasuo Ohnishi’s plug-in |
Good to know
- The channel selector resets the curve each time you switch. That’s intentional, since a curve shaped for Red is unlikely to suit Blue, for example.
- Switching between whole image and single layer mode mid-session also resets the curve and channel.
- Cancel or ESC at any time: your image is left exactly as it was before you opened the plugin.
- The generated mask is fully editable after the plugin closes. Blur it, paint on it, add it to a group and restrict its effects using a group mask. Or run the plugin again from scratch.
What languages is the plug-in available in?
This parametric masks plug-in for GIMP 3 is available in the following languages. You don’t have to do anything to see it in your language. GIMP will automatically load the correct version of the plug-in (provided you follow the installation instructions below).
- Nederlands (Dutch)
- English
- Français (French (Français)
- Deutsch (German)
- Italiano (Italian)
- Magyar (Hungarian)
- 日本語 (Japanese)
- Polski (Polish)
- Português (Portuguese)
- Português (Brazilian)
- Español (Spanish)
- Українська (Ukrainian)
- 简体中文 (Chinese (Simplified))
- 繁體中文 (Chinese (Traditional))
If you have any suggestions to improve those translations, please leave a comment below.
install the Parametric Mask plug-in
How to install
This plug-in is supported on Linux, Windows, and macOS. It does not work in GIMP 2.
If you run into any problems with any of the steps below, please let me know in the comments below.
1. Download the plug-in
Download the Parametric Mask plug-in as a ZIP file. You’ll extract it as described below in the next section:
2. Copy the downloaded file to where GIMP looks for plug-ins
This is something you have to do for every plug-in you add to GIMP 3.
Find where GIMP looks for plug-ins:
- Open GIMP if it’s not already open and select Edit > Preferences in the GIMP menu.
- In the Preferences dialog, scroll down the list on the left until you find Folders, then click on the expand icon in front of the word to expand that list.
- Scroll down the list of folders and select Plug-ins.
- Still in the Preferences dialog, on the Plug-in Folders panel on the right, locate your plug-in folder(s). You can use the folder that’s listed for your user name or add a new one.
- Click on the “Show file location in the file manager” to open your computer’s file manager.
- Copy the .ZIP file you downloaded into that folder and extract it there. You should see a subfolder named “parametric-mask-v3”. The plug-in is inside that folder (see the note below for why it should be in its own subfolder). Don’t move it, just leave it in that subfolder.
- Files downloaded from the internet or transferred across systems may not retain their “executable” flag, especially on UNIX-based systems like Linux and macOS. The plug-in’s .py file needs the correct permission to be executed as a script. It’s a quirk of the different operating systems’ security models. Windows 11 treats plug-in .py files as executable automatically.
- Linux:
You should be able to right click on the .py file and set the permission to allow it as an executable (see below for an example screenshot). Or you could set it in your Terminal app with the commandchmod +x. For example, with GIMP 3 I extracted the plug-in folder into a subfolder of Documents, so the command would be[PATH TO WHERE YOU EXTRACTED THE PLUG-IN FOLDER]/.py/parametric-mask-v3-v3parametric-maskchmod +x "Documents/GIMP plug-ins/.-v3.py"/-v3parametric-maskparametric-mask - macOS:
You may be able to right click on the .py file and set the permission to allow it as an executable (see below for an example screenshot). Otherwise, follow these instructions from Apple.
- Linux:
There are two files in the parametric-mask-v3 folder that need to be marked as executable: parametric-mask-v3.py and helpers.py. Do not mark any other files in that folder as executable.
3. Register the plug-in with GIMP
Now you have to register the plug-in with GIMP: just close and re-open GIMP.
If all has gone according to plan, you should find a menu entry called Layer > Mask > Parametric mask. If not, please leave a comment below.
4. Optional: create a keyboard shortcut
If you want to assign a keyboard shortcut to a luminosity mask menu item, go right ahead:
These instructions are the same as for my other GIMP plug-ins (Interactive luminosity masks, Frequency separation, Dodge and burn…). Only the plug-in names are changed.
Why it’s important to follow these steps
GIMP version 3.x requires that every plug-in must live in a folder with exactly the same name as the plug-in file. So for example, you add the subfolder where you’ve saved the plug-in file to the list of folders where GIMP looks for plug-ins, and that folder needs to be named exactly the same as the plug-in with that subfolder.
This is an example of how working with free software isn’t entirely free. You have to do some of the work that other systems automate, and put your thinking cap on. Bear in mind that GIMP is developed and maintained by volunteers who donate their time and talents as and when they can. So sometimes documentation lags behind development.
Key takeaways
- Creating a mask from a channel in GIMP used to mean not-very-obvious manual work. This plug-in does it in a few clicks.
- A parametric mask in GIMP is generated from your image data, not drawn by hand; the plug-in does the heavy lifting.
- Luminance masking targets tones by brightness. Channel masking opens up colour-based selections. The plug-in handles both.
- A channel mask in GIMP built from Red, Green, or Blue can isolate subjects that luminance alone can’t separate.
- The plug-in’s curve editor gives you full control over mask transitions, from soft and graduated to hard-edged. No manual painting required.
- The mask is fully editable after the plug-in closes.
Leave a Reply