I have a classified raster with three classes. One of them has to be hollow. I added a legend which looks like this.
Apparently, the opacity level - in this case 0% - is not transferred to the legend in the map. On the right side you can see that the color in the map is hollow. I created "hollow" by selecting any color, in this case orange, and setting the opacity to 0%. Is there any way to transfer the opacity / transparency level to the legend in the map?
This is how I got this legend:
Load a raster file with categorical data (in this case values 0, 1, and 2)
Properties -> Style -> Render type:
Singleband pseudocolor
->Classify
-> Choose colors (One of them was a random color, here orange, withOpacity=0%
)- Change to new Map Composer. Add a Map and a Legend.
Result:
The legend now shows the random color. However the opacity is not forwarded to the legend.
I'm aware that in this case it might be possible to change the random color to white and thus synthesize the "hollow" color. However, I think this might be useful for other users who face this problem as well.