[Qgis-user] Linking label colour to line colour?

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Tue Jun 11 08:45:45 PDT 2019


phaaa ... that was too easy!

simply putting @symbol_color into the expression for data-driven font
colour does the trick.

I really love to see all these functions popping up in the last
versions, but without enough examples in the docs, you'll never know if
just need this single function, or if you need a full circus of other
stuff before or around it in some way.

Now that I found out about the function name, I was finally able to find
the answer on stackexchange as well:
https://gis.stackexchange.com/q/152203/8202

Thanx a lot!

Bernd

Am 11.06.19 um 14:26 schrieb DelazJ:
> Hi Bernd
> You might be looking for the @symbol_color variable
> (https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/expression.html?highlight=symbol_color#variables-functions)
>
> Regards,
> Harrissou
>
> Le 10 juin 2019 21:11:18 GMT+02:00, Bernd Vogelgesang
> <bernd.vogelgesang at gmx.de <mailto:bernd.vogelgesang at gmx.de>> a écrit :
>
>     Hi,
>
>     is there an "easy" way to somehow show the label of a line in the same
>     colour as the line itself?
>
>     I have a layer of 50somewhat lines which mark overlapping areas. To be
>     able to better differenciate between those on a map, I would like to
>     give the labels of the line feature the same colours as the lines
>     themselves (sounds reasonabe).
>
>     The lines are just random coloured as categorical by their unique name.
>     Can I somehow get the information of the line colour, so I can set the
>     label colour data-driven by some expressions or so?
>
>     Cheers,
>
>     Bernd
>     ------------------------------------------------------------------------
>     Qgis-user mailing list
>     Qgis-user at lists.osgeo.org  <mailto:Qgis-user at lists.osgeo.org>
>     List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
>     Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190611/1cab022e/attachment.html>


More information about the Qgis-user mailing list