Re: [Qgis-user] Extracting colours from a vector file

2024-04-09 Thread Alexei Schwab via QGIS-User
Hi Grant,

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.

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. 

It will give you a hex colour code. 

If you need the RGB values, you can use  the expression:

colour_part(@symbol_color, 'red'), colour_part(@symbol_color, 'green'), 
colour_part(@symbol_color, 'blue')

Regards,

Alexei

On Tue, 9 Apr 2024, at 08:54, Grant Boxer via QGIS-User wrote:
> 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?
> Cheers Grant, Perth WA
>  
> ___
> QGIS-User mailing list
> QGIS-User@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 
___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Extracting colours from a vector file

2024-04-09 Thread Grant Boxer via QGIS-User
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?

Cheers Grant, Perth WA

 

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user