<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Immo,<br>
      <br>
      Which version of QGIS are you using?<br>
      <br>
      Frank.<br>
      <br>
      On 17/07/2017 09:48, Immo Blecher via qgis-za-user wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6b8b6325-8094-2b01-ec0d-370f9bcca053@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <p>Good Morning Everyone,</p>
      <p>I have a geology layer with a few columns, including the
        chronostratigraphic symbol, the rock type description and,
        importantly, a colour column (String type). The values stored in
        the colour column are the HTML hex values for the colour
        according to the 1 : 1 000 000 simplified geological map of
        South Africa.</p>
      <p>When I open the layer and select the colour column for
        colouring the lithological units it works beautifully, but I do
        not get a legend for the composer. But if I set the
        Properties|Style to Categorized and then again select the colour
        from the Colour column in the table I also get the same nicely
        coloured map according to the colour column, an a Legend. But
        the Legend is wrong...it chooses random colours! What am I doing
        wrong? Is there a way to get a correct legend, also only showing
        the units which are actually on the map in the composer. I can
        set the colours manually to match the value in the colour field
        but that sort of defeats the purpose.</p>
      <p>Thanks for your help so long,</p>
      <p>Immo<br>
      </p>
      <div class="moz-signature">-- <br>
        <meta http-equiv="content-type" content="text/html;
          charset=utf-8">
        <title></title>
        <div class="moz-signature">
          <div class="moz-signature">
            <p style="background: transparent; border: none; padding:
              0in"><strong><font color="#000000">Immo F. Blecher</font></strong><strong><font
                  color="#808080"><br>
                  Street: </font></strong><em><font color="#808080"> 52
                  Lynedoch Eco Village, Lynedoch, 7603, South Africa<br>
                </font></em><em><font color="#808080"><span
                    style="font-style: normal"><b>Postal:</b></span></font></em><em><font
                  color="#808080"> 52 Lynedoch Eco Village, Lynedoch,
                  7603, South Africa<br>
                </font></em><em><font color="#808080"><span
                    style="font-style: normal"><b>Cell:</b></span></font></em><em><font
                  color="#000000"> </font></em><font color="#808080">+27
                83 272 6791 </font><font color="#ff6600">|</font><font
                color="#666666"> </font><font color="#666666"><b>Fax: </b></font><font
                color="#808080">+27 86 7363302 </font><font
                color="#808080"><b>Email:</b></font><font
                color="#808080"> </font><a
                href="mailto:immo@blecher.co.za" moz-do-not-send="true"><font
                  color="#0000ff"><u>immo@blecher.co.za</u></font></a> <font
                color="#ff6600">| </font><a
                href="mailto:immob19@gmail.com" moz-do-not-send="true"><font
                  color="#0000ff"><u>immob19@gmail.com</u></font></a><font
                color="#0000ff"><span style="text-decoration: none"> </span></font><font
                color="#ff6600"><span style="text-decoration: none">| </span></font><font
                color="#0000ff"><u><a
                    href="mailto:immob@mymtnmail.co.za"
                    moz-do-not-send="true">immob@mymtnmail.co.za</a><br>
                </u></font><font color="#666666"><span
                  style="text-decoration: none"><b>Internet:</b></span></font><font
                color="#666666"><span style="text-decoration: none"> </span></font><a
                href="http://www.blecher.co.za/" moz-do-not-send="true"><font
                  color="#0000ff"><span style="text-decoration: none"><u>http://www.blecher.co.za/</u></span></font></a></p>
            <img
src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=2.9.5&t=1320849250746&u=82e4b3250c4ca423"
              name="graphics6" moz-do-not-send="true" border="0"
              align="BOTTOM" width="2" height="2">
            <div id="WISESTAMP_SIG_9425" dir="LTR"><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
qgis-za-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:qgis-za-user@lists.osgeo.org">qgis-za-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-za-user">https://lists.osgeo.org/mailman/listinfo/qgis-za-user</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>