In QGIS 3.8 (Win 10) I have a Point-Layer with labels in a certain distance and leader lines, created with geometry-generator. The leader lines in some cases cross below the label and are masked by a text-buffer in white. However, some of the labels are above the sea - so in these cases, it would be better not to have a white buffer. I tried to make the buffer in blue by defining the color with data-defined override and using the following expression:
if (("NAME" = 'name 2a' or "NAME" = 'name 3' or "NAME" = 'name 3a' ),blue, white)
However, the color does not change. I also tried to add the color-code in hex (#65baf2 instead o blue and #ffffff instead of white), but with the same result. How can I set different buffer-style for certain labels?