I have 3 separate raster layers with binary values (1/0).
By assigning the 3 primary RGB colors to each of the layers, I would like to obtain a representation that expresses the overlap of the layers themselves with the derived colors, as in the diagram below.
I tried to reclassify the 3 layers by assigning the value 255 to the original 1 and the value 0 to the original 0, then I combined them into a single virtual layer by assigning a band to each of the 3 layers.
The result, however, is not what I expected, as shown in the first screenshot below.
Basically I get the white color where the 3 layers have overlap in the original value 1 (255) and the black where they have overlap in the original value 0 (0). However, I can't get the secondary colors cyan, magenta and yellow where only 2 layers overlap.
I can get the result I want by assigning one of the 3 RGB primary colors each to the 3 binary layers and using the "Addition" Blending mode
in the Rendering Layer
, as shown in the second screenshot. But in this way I'm forced to use a dark layer as background, to obtain pure secondary colors.