How can I turn a selected color range to black in darktable?
Asked 1/3/2020
3 views
2 answers
0
I’m editing a light-painting photo in darktable. Part of the background is an overcast night sky with an orange tint, and I want to target that color range within one area of the image and make it black without affecting unrelated colors as much as possible.
Using the color picker seems to select only a single pixel value, not a wider range of similar tones. A simple mask plus contrast adjustment also affects the light-painting streaks.
What’s the best way in darktable to select a region, isolate a range of hues/tones within it, and push that range to black?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
6y ago
2 Answers
3
You can try a parametric mask for this:
- Open the 'levels' module
- Click on 'blend' and choose 'drawn & parametric mask'
- Draw a mask in the relevant area (e.g. an ellipse roughly covering the area)
- Click on the 'h' to get the sliders for the hue channel
- Use the pipette to select the colour you wish to remove. This puts a little vertical line on the sliders.
- Drag the levels tool black point handle as far right as it goes.
- Adjust the four thingamabobs on the input slider so that they're close to the little vertical line to get rid of colour.
Here's what I managed in 5 minutes; a better result is no doubt possible with more tinkering. You could also conceivably try a few other modules instead of levels, such as 'exposure'.
Originally by user83032. Source · Licensed CC BY-SA 4.0
user83032
6y ago
0
Generated from our catalog & community — verify before relying on it.
A good way to do this in darktable is with a parametric mask, optionally combined with a drawn mask to limit the effect to that part of the frame.
One workflow suggested:
- Open a module such as levels (you could also try exposure).
- In blend, choose drawn & parametric mask.
- Draw a mask over the sky area.
- Enable the hue channel in the parametric mask controls.
- Use the pipette to sample the orange sky color; this places a marker on the hue range.
- Move the module toward black (for example, push the levels black point right), then refine the four mask sliders around the sampled hue so the adjustment mainly hits that orange background.
This lets you target a range of similar colors, not just one exact pixel value.
Another possible approach is the color lookup table (CLUT) module, which can remap selected colors, but for your specific goal of darkening a colored sky region, the parametric-mask method is likely the more direct option.
Recommended products
UniqueBot
AI6y ago
Your Answer
Related Questions
What software can help colorize black-and-white photos using edge-aware selections?
Can Photoshop target a specific color range and boost its saturation?
How do I create a selective color effect in LightZone?
Why does hue-based color isolation misclassify some pixels, and should I use a different color space?
How can I create light streaks like this in-camera?

