I made a categorized symbology on a shapefile, but the color value of outline (stroke color) is different than the color of fill color option. How can I ensure that both colors are the same for fill color and outline color using categorized symbology? See an example below.

enter image description here


You can use Data defined override.

Before categorizing click on change symbol, then choose data defined override for Stroke color and enter the expression @symbol_color.

Note that this will not be visible in your legend. You can just use a 100% transparent color to make the legend look like your polygons as shown in the screenshot.

enter image description here

However, in my personal eyes it would make more sense to use No Pen as Stroke Style.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.