In QGIS Expression builder. I want to obtain the color code of the current feature.
I mean:
My layer contains lines, each one is painted with a different color. Now I want to assign that color to its label. In label definition, in the color property's expressions builder, how could I obtain that attribute?
I tried:
attribute( $currentfeature, 'color')
But it is not working...
Answer
In QGIS >= 2.14 you can use the symbol_color variable. Eg, set a data defined override for your label color to the expression @symbol_color
No comments:
Post a Comment