The starting point: Loading a raster to QGIS, you can set individual colors to transparent in the Panel Layer styling / Tab Transparency
by activating the icon Add values from display
and click on the map canvas. The color of the selected raster pixel will be set to transparent (see screenshot below).
The problem and what I tried: As can be seen in the screenshot, often (especially using georeferenced jpg-images) what for the eye is one color, technically consists of several different colors with very similar values for red/green/blue: different shades of the same color. Of course, you could repeatedly use the Add values from display
and click on the map to add further colors to the transparency setting.
The question: However, this can be annoying. Is there a way to select a range of colors to be set to transparent? I'm looking for something like tools known from image processing software like Photoshop or Affinity Photo, e.g. the Flood Select Tool
in Affinity Photo: Tolerance—sets the range of pixels affected when a pixel is clicked.
Screenshot: Only part of the see is set to transparent (RGB value: 221/242/247), showing the OpenStreetMap basemap in the background. Neighboring pixels with - let's say - RGB 225/240/243 are still opaque: