[Qgis-user] QGIS set the feature label background color the same as the feature style color

Leahy, Thomas A. tleahy at bechtel.com
Tue Jul 21 04:13:03 PDT 2015


Ujaval,

Thank you for your quick response.
I will look into the information you sent me.

I had found the link below but haven’t had a chance to check it out.
http://gis.stackexchange.com/questions/152203/qgis-get-currentfeatures-color-in-the-expresions-builder

       All the Best,
       Tom


From: Ujaval [mailto:ujaval at gmail.com]
Sent: Tuesday, July 21, 2015 2:08 PM
To: Leahy, Thomas A.
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] QGIS set the feature label background color the same as the feature style color [*EXTERNAL*]

In the Label -> Background -> Fill Color, you can use the 'Data Defined override' to enter an expression for the color based on a field

See this for more details
http://gis.stackexchange.com/questions/104706/how-to-create-a-gradient-color-expression-in-data-defined-properties

If you don't want to use the ramps and set individual color values for the background, you can use an expression like

CASE WHEN  "field" = 1 THEN '0,0,0,255'
 WHEN "field" = 2 THEN '100,100,100,255'
END

-Ujaval

On Tue, Jul 21, 2015 at 10:55 AM, Leahy, Thomas A. <tleahy at bechtel.com<mailto:tleahy at bechtel.com>> wrote:
Hello,

          I am trying to set the feature label background color the same as the feature style color.

  I have features colored differently in Style (Categorized based on a field) and I would like the label background color to be set the same color as the feature style color.
  I have just started working on this and was wondering if someone has already done it and can just tell me how it is done.

           Thanks,
           Tom Leahy


_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150721/a28c5ad0/attachment.html>


More information about the Qgis-user mailing list