<div dir="ltr">In the Label -> Background -> Fill Color, you can use the 'Data Defined override' to enter an expression for the color based on a field<div><br></div><div>See this for more details</div><div><a href="http://gis.stackexchange.com/questions/104706/how-to-create-a-gradient-color-expression-in-data-defined-properties">http://gis.stackexchange.com/questions/104706/how-to-create-a-gradient-color-expression-in-data-defined-properties</a><br></div><div><br></div><div>If you don't want to use the ramps and set individual color values for the background, you can use an expression like</div><div><br></div><div><div>CASE WHEN  "field" = 1 THEN '0,0,0,255'</div><div> WHEN "field" = 2 THEN '100,100,100,255'</div><div>END</div></div><div><br></div><div>-Ujaval</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 21, 2015 at 10:55 AM, Leahy, Thomas A. <span dir="ltr"><<a href="mailto:tleahy@bechtel.com" target="_blank">tleahy@bechtel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">          I am trying to set the feature label background color the same as the feature style color.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">  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.<u></u><u></u></p>
<p class="MsoNormal">  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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">           Thanks,<u></u><u></u></p>
<p class="MsoNormal">           Tom Leahy<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>