How can I change the colour of text labels by category? EG, I have a text layer with text that is categorised into 6 different categories. I need either the text itself, or its background to match the colour of polygons that are also in that category. I've hunted through here but can't find any answers that I can understand. It looks like the way forward involves some kind of rule based style, but I can't make head nor tail of the info I've found If I was using our old method, I would have text boxes with black text, a background that was a lighter shade of the colour used for the category, and an outline to the text box in a darker shade of that colour. Is there a way to do something similar here? I've added some screenies. With the text all the same colour and the background all the same colour, it's difficult to see which label belongs to which object.