1

I am using QGIS and C++.

When I create a layer of polygons with labels in the center I am able to use a RuleBasedRenderer to control the background colour of the polygon. How do I similarly control the colour of the label? The background colours are limited so the combinations will not be too long. So when for instance, the background is black, I want the label to be white.

Is it possible to have white labels on black polygons and black text on white polygons exist on the same layer?

  • For future users who come to this post. I ended up layering/linking 2 layers on top of each other to accomplish what I needed. Hopefully v2.10 or later will eventually add this functionality built-in – William_Wilson Sep 22 '15 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.