Bug report #20800

Stroke color override with @symbol_color does not use overridden Fill color

Added by Johannes Kroeger about 5 years ago. Updated about 5 years ago.

Affected QGIS version:3.5(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28620


  1. Use some polygon data.
  2. Override the fill color to something with an expression, e.g. color_rgb(255,0,0)
  3. Override the stroke color to use @symbol_color

The stroke will not use the overridden fill color but the color that option had before the overriding.

The stroke should be using the overridden fill color.


#1 Updated by Nyall Dawson about 5 years ago

  • Status changed from Open to Feedback

This is working as intended -- The @symbol_color variable contains the color set for the "top level" of the symbol (i.e. the color you see when you click the "Marker"/"Line"/"Fill" option at the top of the symbol widget's layer list.

When you override the fill color, you're only setting the color for that single symbol layer, but potentially there could be many layers in your symbols, each with their own colors.

I think this report is more of a "feature request", requiring new variable(s) of the type @symbol_layer_fill_color, etc. But that's also complicated -- because there's no dependency resolution here, and you could potentially have the outline color depend on the fill color, OR the fill color depend on the outline color, etc...

#2 Updated by Nyall Dawson about 5 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF