<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11pt;font-family:Aptos, sans-serif;}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Grant,<br></div><div><br></div><div>Not sure if this is what you mean but if you want to get the colour of a feature's symbol you can use @symbol_color in the expression builder.<br></div><div><br></div><div>So adding a "colour" column to your attributes and using field calculator to set the expression to @symbol_color will give you the colour for each feature. <br></div><div><br></div><div>It will give you a hex colour code. <br></div><div><br></div><div>If you need the RGB values, you can use  the expression:<br></div><div><br></div><div>colour_part(@symbol_color, 'red'), colour_part(@symbol_color, 'green'), colour_part(@symbol_color, 'blue')<br></div><div><br></div><div>Regards,</div><div><br></div><div>Alexei</div><div><br></div><div>On Tue, 9 Apr 2024, at 08:54, Grant Boxer via QGIS-User wrote:<br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><p class="qt-MsoNormal">I would like to extract colours from a rule-based rendered shp file with the aim of applying these colours to a MapInfo tab file. I have tried the rgb function but that doesn’t seem to work. Anyone have any suggestions to extract the red, green and blue values?<br></p><p class="qt-MsoNormal">Cheers Grant, Perth WA<br></p><p class="qt-MsoNormal"> <br></p></div><div>_______________________________________________<br></div><div>QGIS-User mailing list<br></div><div><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br></div><div>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></div><div>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></div><div><br></div></blockquote><div><br></div></body></html>